prevent scrolling when focused
This commit is contained in:
parent
d19f8a267a
commit
f068d6280d
|
@ -64,7 +64,7 @@ const DropdownMenuItem = ({ index, item, onClick }: IDropdownMenuItem) => {
|
||||||
const firstItem = index === 0;
|
const firstItem = index === 0;
|
||||||
|
|
||||||
if (itemRef.current && firstItem) {
|
if (itemRef.current && firstItem) {
|
||||||
itemRef.current.focus();
|
itemRef.current.focus({ preventScroll: true });
|
||||||
}
|
}
|
||||||
}, [itemRef.current, index]);
|
}, [itemRef.current, index]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue