Skip to content

Commit

Permalink
Components: refactor NavigationMenu to ignore exhaustive-deps (#4…
Browse files Browse the repository at this point in the history
  • Loading branch information
chad1008 authored and ockham committed Sep 19, 2022
1 parent 6b84972 commit 32d0778
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Internal

- `NavigationMenu` updated to ignore `react/exhaustive-deps` eslint rule ([#44090](https://github.com/WordPress/gutenberg/pull/44090)).

## 21.0.0 (2022-09-13)

### Breaking Changes
Expand Down
2 changes: 2 additions & 0 deletions packages/components/src/navigation/menu/menu-title-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ function MenuTitleSearch( {
count
);
debouncedSpeak( resultsFoundMessage );
// Ignore exhaustive-deps rule for now. See https://github.com/WordPress/gutenberg/pull/44090
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [ items, search ] );

const onClose = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,7 @@ export const useNavigationTreeMenu = ( props ) => {
return () => {
removeMenu( key );
};
// Ignore exhaustive-deps rule for now. See https://github.com/WordPress/gutenberg/pull/44090
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [] );
};

0 comments on commit 32d0778

Please sign in to comment.