(`input[name="${color}"]`)?.focus();
}
},
- []
+ [color]
);
+ React.useEffect(focusOnSelected, [focusOnSelected]);
+
return (
{
aria-label='colors'
ref={ref}
onKeyDown={handleKeyNavigation}
- onFocus={initialFocus}
+ onFocus={focusOnSelected}
>
{highlightStyles.map((style) =>