From 4cde72927cb723dc470ed950251846fd8abd96e4 Mon Sep 17 00:00:00 2001 From: David Andrianarivo Date: Thu, 6 Feb 2025 10:33:16 +0300 Subject: [PATCH] Update multi-select.tsx --- src/components/multi-select.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/multi-select.tsx b/src/components/multi-select.tsx index ee5eeca..068a08b 100644 --- a/src/components/multi-select.tsx +++ b/src/components/multi-select.tsx @@ -142,6 +142,10 @@ export const MultiSelect = React.forwardRef< const [isPopoverOpen, setIsPopoverOpen] = React.useState(false); const [isAnimating, setIsAnimating] = React.useState(false); + React.useEffect(() => { + setSelectedValues(defaultValue); + }, [defaultValue]); + const handleInputKeyDown = ( event: React.KeyboardEvent ) => {