-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deleted menus reappear when switching to Menu Locations tab and back again #22340
Comments
I believe this is because the It might need to be hoisted up a few levels. |
I thought I solved that :D Will take a look! |
The real problem is
this should know we deleted something and get a fresh copy ✅ It doesn't so we'll probably, for now, need to move the state out of the |
I also thought it might be good if instead of creating At the moment it feels a little fragile as it relies on The psuedocode would be something like: const menus = useSelect( ( select ) => omit( select( 'core' ).getMenus(), deletedMenus ), [ deletedMenus ] ); |
It's a good workaround for the purposes of this experiment. In the longer run we should be addressing the root cause of the issue as in why are these items not getting removed from the store? |
#22625 looks like the same sort of issue, but relates to menu selection. |
What's the status of this? @draganescu: Are you still working on it?
Agreed. |
I don't think this happens anymore since merging #22428. I tested and it worked. Can anyone else confirm? |
I wasn't able to reproduce it either. |
Describe the bug
On the experimental navigation menu page, deleted menus reappear when switching to Menu Locations tab and back again.
To reproduce
Steps to reproduce the behavior:
Expected behavior
The deleted menu doesn't reappear
The text was updated successfully, but these errors were encountered: