Skip to content

Commit

Permalink
Mutate menu items state when flagging item customization
Browse files Browse the repository at this point in the history
  • Loading branch information
stokesman committed Apr 10, 2024
1 parent 29b7dc9 commit 58577f0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions packages/components/src/tools-panel/tools-panel/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,8 @@ export function useToolsPanel(
group: ToolsPanelMenuItemKey = 'default'
) => {
setMenuItems( ( items ) => {
const newState = {
...items,
[ group ]: {
...items[ group ],
[ label ]: value,
},
};
return newState;
items[ group ][ label ] = value;
return items;
} );
},
[ setMenuItems ]
Expand Down

0 comments on commit 58577f0

Please sign in to comment.