nicolium: Dropdown menu items fix
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user