[fix] page item submenu (#1461)

This PR fixes a bug that would effect the page item submenu. With the
`useMenuIsOpen` hook, it's important that multiple menus have unique
ids. In this case each page was using `page sub menu` and so each open
menu would be closed by the not-open menu effects.

### Change Type

- [x] `patch` — Bug Fix

### Test Plan

1. Create two pages
2. Open the submenus on each page
This commit is contained in:
Steve Ruiz 2023-05-25 16:01:19 +01:00 committed by GitHub
parent 0e9058409d
commit b5cb601725
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,7 +44,7 @@ export const PageItemSubmenu = track(function PageItemSubmenu({
}, [app, item])
return (
<M.Root id="page item submenu">
<M.Root id={`page item submenu ${index}`}>
<M.Trigger>
<Button title={msg('page-menu.submenu.title')} icon="dots-vertical" />
</M.Trigger>