Skip to content

Commit

Permalink
Spotless Apply
Browse files Browse the repository at this point in the history
  • Loading branch information
zhu-mingye authored and github-actions[bot] committed Oct 30, 2023
1 parent d89485d commit 4bd12b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,8 @@ type TreeProps = {
};

const JobTree: React.FC<TreeProps & connect> = (props) => {
const {
projectData,
onNodeClick,
style,
height,
onRightClick,
selectKeyChange,
selectedKeys
} = props;
const { projectData, onNodeClick, style, height, onRightClick, selectKeyChange, selectedKeys } =
props;

const [searchValue, setSearchValueValue] = useState('');
const [data, setData] = useState<any[]>(buildProjectTree(projectData, searchValue));
Expand Down Expand Up @@ -111,7 +104,7 @@ const JobTree: React.FC<TreeProps & connect> = (props) => {
.filter((item: any, i: number, self: any) => item && self.indexOf(item) === i);
setExpandedKeys(expandedKeys);
setAutoExpandParent(true);
selectKeyChange([treeKey])
selectKeyChange([treeKey]);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { ProjectState } from '@/types/Studio/state.d';
import { l } from '@/utils/intl';
import { Modal, Typography } from 'antd';
import { MenuInfo } from 'rc-menu/es/interface';
import React, {Key, useEffect, useState} from 'react';
import React, { Key, useEffect, useState } from 'react';
import { connect } from 'umi';

const { Text } = Typography;
Expand Down Expand Up @@ -354,7 +354,9 @@ const Project: React.FC = (props: connect) => {
return (
<div style={{ paddingInline: 5 }}>
<JobTree
selectKeyChange={(keys: Key[]) => setProjectState((prevState) => ({ ...prevState, selectedKeys: keys }))}
selectKeyChange={(keys: Key[]) =>
setProjectState((prevState) => ({ ...prevState, selectedKeys: keys }))
}
selectedKeys={projectState.selectedKeys}
onRightClick={handleRightClick}
onNodeClick={(info: any) => onNodeClick(info)}
Expand Down

0 comments on commit 4bd12b3

Please sign in to comment.