Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
charithAmila committed Mar 11, 2024
1 parent a2572a7 commit b3af1b4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions components/lib/panelmenu/PanelMenuList.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,13 @@ export const PanelMenuList = React.memo((props) => {
setActiveItemPath(_activeItemPath);
}

if (processedItem.item) {
processedItem.item = {
...processedItem.item,
expanded
};
}

DomHandler.focus(getListElement());
setFocusedItem(processedItem);
};
Expand Down
2 changes: 1 addition & 1 deletion components/lib/panelmenu/PanelMenuSub.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const PanelMenuSub = React.memo(
};

const isItemActive = (processedItem) => {
return props.activeItemPath && props.activeItemPath.some((path) => path.key === processedItem.key);
return (props.activeItemPath && props.activeItemPath.some((path) => path.key === processedItem.key)) || !!processedItem.item?.expanded;
};

const isItemVisible = (processedItem) => {
Expand Down

0 comments on commit b3af1b4

Please sign in to comment.