Skip to content

Navigation Editor - theme location change causes rerender #30139

@grzim

Description

@grzim

Description

Mentioned in #29458
When a user changes the value in any of the theme location dropdowns in Navigation Editor the entire editor rerenders.

Step-by-step reproduction instructions

Expected behaviour

New menu is applied to the location and the window remains open

Actual behaviour

The entire editor rerenders

Code snippet (optional)

Could be related to useNavigationEditor:
https://github.com/WordPress/gutenberg/blob/trunk/packages/edit-navigation/src/components/layout/index.js#L59
That the navigationPost used is temporarily unavailable, which makes the editor briefly not rendered:
https://github.com/WordPress/gutenberg/blob/trunk/packages/edit-navigation/src/components/layout/index.js#L68

WordPress information

  • Gutenberg version: 10.2.1

Device information

  • Device: MacOS
  • Operating system: Big Sur
  • Browser: Chrome 89

Metadata

Metadata

Assignees

Labels

[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions