From e5a949cb2843f5195454eca17a3c5067cccb3841 Mon Sep 17 00:00:00 2001 From: Fredrik Wold Date: Thu, 29 Feb 2024 22:26:22 +0100 Subject: [PATCH] fix: fixes issue causing combobox to grab focus on render --- src/hooks/useMultipleSelection/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hooks/useMultipleSelection/index.js b/src/hooks/useMultipleSelection/index.js index e8e95186..175394cb 100644 --- a/src/hooks/useMultipleSelection/index.js +++ b/src/hooks/useMultipleSelection/index.js @@ -93,7 +93,8 @@ function useMultipleSelection(userProps = {}) { } else if (selectedItemRefs.current[activeIndex]) { selectedItemRefs.current[activeIndex].focus() } - }, [activeIndex, isInitialMount]) + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [activeIndex]) useControlPropsValidator({ props, state,