From a847a5a13a1d6ebe8ce90bd0cf0ee58087e82180 Mon Sep 17 00:00:00 2001 From: chad1008 <13856531+chad1008@users.noreply.github.com> Date: Thu, 2 Jun 2022 07:09:11 -0400 Subject: [PATCH 1/2] Dropdown: add `onToggle` to `useEffect` dependency array --- packages/components/src/dropdown/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/src/dropdown/index.js b/packages/components/src/dropdown/index.js index 72a394ef043e6..df70e3689eee4 100644 --- a/packages/components/src/dropdown/index.js +++ b/packages/components/src/dropdown/index.js @@ -50,7 +50,7 @@ export default function Dropdown( props ) { onToggle( false ); } }, - [] + [ onToggle ] ); function toggle() { From 48cd33665a6fbfa76f10fba6543bd7132acd9e70 Mon Sep 17 00:00:00 2001 From: chad1008 <13856531+chad1008@users.noreply.github.com> Date: Thu, 2 Jun 2022 08:30:18 -0400 Subject: [PATCH 2/2] Dropdown: update changelog --- packages/components/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index f183b3124ab14..b4041d89edc1c 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -30,6 +30,7 @@ - `BoxControl`: Update unit tests to use `@testing-library/user-event` ([#41422](https://github.com/WordPress/gutenberg/pull/41422)). - `Surface`: Convert to TypeScript ([#41212](https://github.com/WordPress/gutenberg/pull/41212)). - `Autocomplete` updated to satisfy `react/exhuastive-deps` eslint rule ([#41382](https://github.com/WordPress/gutenberg/pull/41382)) +- `Dropdown` updated to satisfy `react/exhuastive-deps` eslint rule ([#41505](https://github.com/WordPress/gutenberg/pull/41505)) ### Experimental