diff --git a/src/hooks/useCombobox/index.js b/src/hooks/useCombobox/index.js index cff04761..e36d3f27 100644 --- a/src/hooks/useCombobox/index.js +++ b/src/hooks/useCombobox/index.js @@ -139,6 +139,10 @@ function useCombobox(userProps = {}) { // Make initial ref false. useEffect(() => { isInitialMountRef.current = false + + return () => { + isInitialMountRef.current = true + } }, []) // Reset itemRefs on close. useEffect(() => { diff --git a/src/hooks/useMultipleSelection/index.js b/src/hooks/useMultipleSelection/index.js index 74cda2a8..666638c0 100644 --- a/src/hooks/useMultipleSelection/index.js +++ b/src/hooks/useMultipleSelection/index.js @@ -99,6 +99,10 @@ function useMultipleSelection(userProps = {}) { // Make initial ref false. useEffect(() => { isInitialMountRef.current = false + + return () => { + isInitialMountRef.current = true + } }, []) // Event handler functions. diff --git a/src/hooks/useSelect/index.js b/src/hooks/useSelect/index.js index 9eb224a5..6243d607 100644 --- a/src/hooks/useSelect/index.js +++ b/src/hooks/useSelect/index.js @@ -159,6 +159,10 @@ function useSelect(userProps = {}) { // Make initial ref false. useEffect(() => { isInitialMountRef.current = false + + return () => { + isInitialMountRef.current = true + } }, []) // Reset itemRefs on close. useEffect(() => {