Dropdown: Fixes missing calls to onVisibilityChange causing wrong caret states (#87923)

This commit is contained in:
Torkel Ödegaard 2024-05-15 17:07:59 +02:00 committed by GitHub
parent 93acc0c932
commit ce18b2f983
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -73,12 +73,12 @@ export const Dropdown = React.memo(({ children, overlay, placement, offset, onVi
const animationStyles = useStyles2(getStyles, animationDuration);
const onOverlayClicked = () => {
setShow(false);
handleOpenChange(false);
};
const handleKeys = (event: React.KeyboardEvent) => {
if (event.key === 'Tab') {
setShow(false);
handleOpenChange(false);
}
};