Skip to content

Commit

Permalink
Components: refactor DateDayPicker to pass exhaustive-deps (#41470)
Browse files Browse the repository at this point in the history
* DateDayPicker: add `day` to `useEffect` dependency array

* DateDayPicker: update changelog
  • Loading branch information
chad1008 authored Jun 2, 2022
1 parent 4b3aed1 commit 97fc302
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +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))

- `DateDayPicker` updated to satisfy `react/exhuastive-deps` eslint rule ([#41470](https://github.com/WordPress/gutenberg/pull/41470)).
### Experimental

- `Spacer`: Add RTL support. ([#41172](https://github.com/WordPress/gutenberg/pull/41172))
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/date-time/date/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function DatePickerDay( { day, events = [] }: DatePickerDayProps ) {
);

parentNode.setAttribute( 'aria-label', dayWithEventsDescription );
}, [ events.length ] );
}, [ day, events.length ] );

return (
<Day
Expand Down

0 comments on commit 97fc302

Please sign in to comment.