Skip to content

Commit

Permalink
fix(AsideHeader): returned comment
Browse files Browse the repository at this point in the history
  • Loading branch information
kendoow committed Oct 2, 2024
1 parent f6b4a94 commit b229e6c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/CompositeBar/Item/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ export const Item: React.FC<ItemInnerProps> = (props) => {
) => {
const target = event.currentTarget;
if (collapsedItem) {
/**
* If we call onItemClick for collapsedItem then:
* - User get unexpected item in onItemClick callback
* - onClosePanel calls twice for each popuped item, as result it will prevent opening of panelItems
*/
toggleOpen(!open);
} else if (target instanceof HTMLDivElement) {
onItemClick?.(item, false, event as React.MouseEvent<HTMLDivElement, MouseEvent>);
Expand Down

0 comments on commit b229e6c

Please sign in to comment.