jwf-year-calendar
Version:
A full react version of Paul-DS' js-year-calendar, https://github.com/year-calendar/js-year-calendar. Built with support from JWF Process Solutions Ltd.
10 lines (9 loc) • 333 B
JavaScript
const hideContextMenu = (e, contextMenu, setContextMenu) => {
if (e.target instanceof HTMLElement) {
if (e.target.id === 'contextmenutile' || e.target.parentElement?.id === 'contextmenutile') {
return;
}
}
setContextMenu({ ...contextMenu, visible: false });
};
export default hideContextMenu;