Skip to content

Commit

Permalink
also call onToggle on open changed (keycloak#33813)
Browse files Browse the repository at this point in the history
fixes: keycloak#31415

Signed-off-by: Erik Jan de Wit <[email protected]>
  • Loading branch information
edewit authored Oct 25, 2024
1 parent c4d6979 commit 624817b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/libs/ui-shared/src/select/SingleSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ export const SingleSelect = ({
}}
{...props}
onClick={toggle}
onOpenChange={(isOpen) => setOpen(isOpen)}
onOpenChange={(isOpen) => {
if (isOpen !== open) toggle();
}}
selected={selections}
onSelect={(_, value) => {
onSelect?.(value || "");
Expand Down

0 comments on commit 624817b

Please sign in to comment.