mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 15:36:02 +01:00
fix(web/menu): fix scrolling clipping menu items
This commit is contained in:
@@ -111,7 +111,11 @@ const ListMenu: React.FC = () => {
|
||||
|
||||
useEffect(() => {
|
||||
if (!menu.items[selected]) return;
|
||||
listRefs.current[selected]?.focus();
|
||||
listRefs.current[selected]?.scrollIntoView({
|
||||
block: "nearest",
|
||||
inline: "start",
|
||||
});
|
||||
listRefs.current[selected]?.focus({ preventScroll: true });
|
||||
// debounces the callback to avoid spam
|
||||
const timer = setTimeout(() => {
|
||||
fetchNui(
|
||||
|
||||
Reference in New Issue
Block a user