Skip to content

Commit

Permalink
Components: refactor SearchControl native files to ignore `exhausti…
Browse files Browse the repository at this point in the history
…ve-deps` (#44381)
  • Loading branch information
chad1008 authored Sep 28, 2022
1 parent 94565f6 commit ea7580c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

- `Mobile` updated to ignore `react/exhaustive-deps` eslint rule ([#44207](https://github.com/WordPress/gutenberg/pull/44207)).
- `Popover`: refactor unit tests to TypeScript and modern RTL assertions ([#44373](https://github.com/WordPress/gutenberg/pull/44373)).
- `SearchControl`: updated to ignore `react/exhaustive-deps` eslint rule in native files([#44381](https://github.com/WordPress/gutenberg/pull/44381))
- `ResizableBox` updated to pass the `react/exhaustive-deps` eslint rule ([#44370](https://github.com/WordPress/gutenberg/pull/44370)).
- `Sandbox`: updated to satisfy `react/exhaustive-deps` eslint rule ([#44378](https://github.com/WordPress/gutenberg/pull/44378))
- `FontSizePicker`: Convert to TypeScript ([#44449](https://github.com/WordPress/gutenberg/pull/44449)).
Expand Down
6 changes: 6 additions & 0 deletions packages/components/src/search-control/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ function SearchControl( {
mergeFutureStyles( activeDarkStyles, [ isActive, isDark ] );

setCurrentStyles( futureStyles );
// Disable reason: deferring this refactor to the native team.
// see https://github.com/WordPress/gutenberg/pull/41166
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [ isActive, isDark ] );

useEffect( () => {
Expand All @@ -130,6 +133,9 @@ function SearchControl( {
clearTimeout( onCancelTimer.current );
keyboardHideSubscription.remove();
};
// Disable reason: deferring this refactor to the native team.
// see https://github.com/WordPress/gutenberg/pull/41166
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [] );

const {
Expand Down

0 comments on commit ea7580c

Please sign in to comment.