We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a892b4 commit 8504a27Copy full SHA for 8504a27
src/components/LanguageSelector.tsx
@@ -152,10 +152,14 @@ const LanguageSelector = () => {
152
153
useEffect(() => {
154
if (isOpen && focusedIndex >= 0) {
155
- const elements = Array.from(document.querySelectorAll('.selector__item')) as HTMLElement[];
156
- const focusableElements = elements.filter(el => el.getAttribute('tabIndex') !== '-1');
+ const elements = Array.from(
+ document.querySelectorAll(".selector__item")
157
+ ) as HTMLElement[];
158
+ const focusableElements = elements.filter(
159
+ (el) => el.getAttribute("tabIndex") !== "-1"
160
+ );
161
const element = focusableElements[focusedIndex];
- element?.focus();
162
+ element?.focus();
163
}
164
}, [isOpen, focusedIndex]);
165
0 commit comments