Skip to content

Commit

Permalink
feat:页面切换时,如果是根结点,则展开收缩tree,现在是白页
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffycai authored and 蔡晓冰 committed Feb 8, 2023
1 parent 6e69c27 commit 5ce55bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/node_modules
/.pnp
.pnp.js

yarn.lock
# testing
/coverage

Expand Down
3 changes: 2 additions & 1 deletion src/expamples/ant5/PagesWidget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ export const PagesWidget = memo((
) => {
const { value, onSelect, display } = props

const handleSelect: DirectoryTreeProps['onSelect'] = useCallback((keys: Key[]) => {
const handleSelect: DirectoryTreeProps['onSelect'] = useCallback((keys: Key[],root:any) => {
if(root.node.children) return
onSelect(keys?.[0].toString() || "")
}, [onSelect]);

Expand Down

0 comments on commit 5ce55bd

Please sign in to comment.