mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 15:06:02 +01:00
refactor(web/radial): disable transition when swapping to submenu
This commit is contained in:
@@ -63,10 +63,10 @@ const RadialMenu: React.FC = () => {
|
||||
|
||||
useNuiEvent('openRadialMenu', async (data: { items: RadialMenuItem[]; sub?: boolean } | false) => {
|
||||
if (!data) return setVisible(false);
|
||||
if (visible) {
|
||||
setVisible(false);
|
||||
await new Promise((resolve) => setTimeout(resolve, 100));
|
||||
}
|
||||
// if (visible) {
|
||||
// setVisible(false);
|
||||
// await new Promise((resolve) => setTimeout(resolve, 100));
|
||||
// }
|
||||
setMenu(data);
|
||||
setVisible(true);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user