You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
however, the developer API is not as convenient to use for submenus as it is for commands. For example, one can create a callback for a command to be asked about its visibility (isVisible) or state (isEnabled), but this does not seem to be possible for submenus:
Not sure how good it would be; the trick with re-using execute seems elegant but sadly the type checking would not be of much use here... Unless we would have additional addSubCommand method with items instead of execute.
Also, if I am the only one struggling with this it might not be worth introducing extra complexity.
The text was updated successfully, but these errors were encountered:
Currently, the menu widgets are either:
however, the developer API is not as convenient to use for submenus as it is for commands. For example, one can create a callback for a command to be asked about its visibility (
isVisible
) or state (isEnabled
), but this does not seem to be possible for submenus:lumino/packages/widgets/src/menu.ts
Lines 1871 to 1879 in 77ec35c
Lack of callbacks also means that the we do not have an easy way to:
This led me to use some quirky workarounds when implementing spellcheck suggestions.
One lazy way of getting what I want would be (pseudo-code follows):
Not sure how good it would be; the trick with re-using execute seems elegant but sadly the type checking would not be of much use here... Unless we would have additional
addSubCommand
method withitems
instead ofexecute
.Also, if I am the only one struggling with this it might not be worth introducing extra complexity.
The text was updated successfully, but these errors were encountered: