Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion examples/src/js/FilterExample.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ class FilterExample extends Component {
// Or a children has a matching node
children.length
) {
filtered.push({ ...node, children });
let addNode = { ...node };
// check if node is not in expanded list, add it
if (children.length) {
addNode.children = children;
}
filtered.push(addNode);
}

return filtered;
Expand Down