diff --git a/src/components/InteractiveGroup/useInteractiveGroup.ts b/src/components/InteractiveGroup/useInteractiveGroup.ts index aabc282d..c31019bf 100755 --- a/src/components/InteractiveGroup/useInteractiveGroup.ts +++ b/src/components/InteractiveGroup/useInteractiveGroup.ts @@ -204,7 +204,7 @@ export function useInteractiveGroup< // trigger onSelect callbacks for any new selections if (onSelect && Array.isArray(selectedIds)) { - selectedIds.forEach(id => handleSelectedId(id)); + selectedIds.forEach(id => handleSelectedId(id, allowReselect)); } // trigger the onSelect callback for a re-select if not multi-select diff --git a/src/compositions/InteractiveList/InteractiveList.tsx b/src/compositions/InteractiveList/InteractiveList.tsx index fccd5e10..af32e69c 100755 --- a/src/compositions/InteractiveList/InteractiveList.tsx +++ b/src/compositions/InteractiveList/InteractiveList.tsx @@ -12,7 +12,7 @@ import { UncontrolledInteractiveList, UncontrolledInteractiveListProps } from '. export type InteractiveListProps = Omit & Pick; -/** The interactive list is a managed wrapper around the unmanaged interactive list */ +/** The interactive list is a wrapper around the uncontrolled interactive list */ function InteractiveListBase( { initialSelected, items, ...props }: InteractiveListProps, forwardedRef: React.ForwardedRef, @@ -24,7 +24,7 @@ function InteractiveListBase( const [, dispatch] = reducer; - // this is a managed component so we must watch for items changes + // update the items in the reducer if the items change useEffect(() => { dispatch({ items: items || [], diff --git a/src/hooks/useDeepFocusGroup.ts b/src/hooks/useDeepFocusGroup.ts index 2450e859..4890c2c9 100644 --- a/src/hooks/useDeepFocusGroup.ts +++ b/src/hooks/useDeepFocusGroup.ts @@ -24,6 +24,7 @@ export type UseDeepFocusGroupResponse = { addRef: (props: { id: string; ref: H extends string ? UseDeepFocusGroupRefWithHandle : UseDeepFocusGroupRef; + /** If passive is true then the ref is added but no focus or blur events are triggered at the time of addition */ passive?: boolean; /** To be used with the imperative handle hook */ handle?: string;