Skip to content

Commit

Permalink
fix: do not expand node that doesn't have any children in tree view
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowusr committed Nov 26, 2024
1 parent 7bc3cb9 commit 5fcddd0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/static/modules/reducers/suites-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,10 @@ export default (state: State, action: SomeAction): State => {
const newExpandedTreeNodesById: Record<string, boolean> = {};

while (nodeData) {
newExpandedTreeNodesById[nodeData.id] = true;
nodeData = nodeData.parentData ?? null;
if (nodeData) {
newExpandedTreeNodesById[nodeData.id] = true;
}
}

return applyStateUpdate(state, {
Expand Down

0 comments on commit 5fcddd0

Please sign in to comment.