nicolium: Dropdown menu items fix

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2026-03-17 11:34:06 +01:00
parent 6bd3a3b857
commit 6db8ac8a24

View File

@ -71,9 +71,11 @@ const DropdownMenuItem = ({ index, item, onClick, autoFocus, onSetTab }: IDropdo
navigate({ to: item.to, params: item.params, search: item.search, replace: true });
} else navigate({ to: item.to, params: item.params, search: item.search });
} else if (typeof item.action === 'function') {
const action = item.action;
event.preventDefault();
action(event);
item.action(event);
} else if (typeof item.onChange == 'function') {
event.preventDefault();
item.onChange(!item.checked);
}
};