Disabling the Menu or Submenu Label


Is there any way to disable(The clickable property) the submenu item, and then then reenable them later when either a condition is satisfied or a event is triggered? I need this feature to implement an atom package for developing electron apps. TIA

Support to toggle clickable property of Submenu items