Skip to content

Commit

Permalink
ContentNodeTree: fix showExpand behavior (#9762)
Browse files Browse the repository at this point in the history
  • Loading branch information
spolu authored Jan 6, 2025
1 parent ecd5685 commit 86bc945
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions front/components/ContentNodeTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function ContentNodeTreeChildren({
parentIds,
parentIsSelected,
}: ContentNodeTreeChildrenProps) {
const { onDocumentViewClick, selectedNodes, setSelectedNodes } =
const { onDocumentViewClick, selectedNodes, setSelectedNodes, showExpand } =
useContentNodeTreeContext();

const [search, setSearch] = useState("");
Expand Down Expand Up @@ -176,7 +176,9 @@ function ContentNodeTreeChildren({
return (
<Tree.Item
key={n.internalId}
type={n.expandable ? "node" : "leaf"}
type={
showExpand === false ? "item" : n.expandable ? "node" : "leaf"
}
label={n.title}
labelClassName={
n.providerVisibility === "private"
Expand Down

0 comments on commit 86bc945

Please sign in to comment.