🐛(react) resolve development warning in CalendarAux component
Resolve development warning in `CalendarAux` component caused by recent updates to react-aria dependencies. Update props for next and previous calendar buttons, removing `onFocusChange` before passing to the Button component.
This commit is contained in:
committed by
aleb_the_flash
parent
e4c1df5b0b
commit
c35cc603a7
5
.changeset/pretty-radios-eat.md
Normal file
5
.changeset/pretty-radios-eat.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@openfun/cunningham-react": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fixed development warning in `CalendarAux` component
|
||||||
@@ -174,16 +174,18 @@ const CalendarAux = forwardRef(
|
|||||||
const downshiftMonth = useDownshiftSelect("month", monthItems);
|
const downshiftMonth = useDownshiftSelect("month", monthItems);
|
||||||
const downshiftYear = useDownshiftSelect("year", yearItems);
|
const downshiftYear = useDownshiftSelect("year", yearItems);
|
||||||
|
|
||||||
// isDisabled and onPress props don't exist on the <Button /> component.
|
// isDisabled, onPress and onFocusChange props don't exist on the <Button /> component.
|
||||||
// remove them to avoid any warning.
|
// remove them to avoid any warning.
|
||||||
const {
|
const {
|
||||||
isDisabled: isPrevButtonDisabled,
|
isDisabled: isPrevButtonDisabled,
|
||||||
onPress: onPressPrev,
|
onPress: onPressPrev,
|
||||||
|
onFocusChange: onFocusChangePrev,
|
||||||
...prevButtonOtherProps
|
...prevButtonOtherProps
|
||||||
} = prevButtonProps;
|
} = prevButtonProps;
|
||||||
const {
|
const {
|
||||||
isDisabled: isNextButtonDisabled,
|
isDisabled: isNextButtonDisabled,
|
||||||
onPress: onPressNext,
|
onPress: onPressNext,
|
||||||
|
onFocusChange: onFocusChangeNext,
|
||||||
...nextButtonOtherProps
|
...nextButtonOtherProps
|
||||||
} = nextButtonProps;
|
} = nextButtonProps;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user