Skip to content

Commit 86ace2b

Browse files
committed
Fix a bug in not removing item from path
1 parent 8e9bfdd commit 86ace2b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/react-headless-nested-menu.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ const reducer = produce((draft: Draft<NestedMenuState>, action: Action) => {
6666
case 'close-path':
6767
const index = draft.currentPath.indexOf(action.item.id)
6868
draft.currentPath.splice(index)
69+
draft.currentPathItems.splice(index)
6970
break
7071
default:
7172
break

0 commit comments

Comments
 (0)