Skip to content

Commit

Permalink
Fix issue when toogling folders (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdelboca authored Sep 2, 2024
1 parent d01edfb commit 849ecc1
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions client/components/Parts/Trees/File.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ export default function FileTree(props: FileTreeProps) {
expanded={expanded}
onNodeSelect={(_event, nodeIds) => props.onSelect(nodeIds)}
onNodeToggle={(_event: React.SyntheticEvent, nodeIds: string[]) => {
// On collapsing we don't collapse a folder if it's not yet selected
const isCollapsing = nodeIds.length < expanded.length
if (isCollapsing && !expanded.every((value) => selected.includes(value)))
return
setExpanded(nodeIds)
}}
defaultCollapseIcon={<img src={openFolderIcon} alt="" />}
Expand Down

0 comments on commit 849ecc1

Please sign in to comment.