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
so in my case I was able to work around this by deselecting the menu item immediately after it getting selected
.addPlugin(new RowContextMenuPlugin<>(
Menu.<String>create()
.appendChild(MenuItem.<String>create("Add Record").withValue("add"))
.appendChild(MenuItem.<String>create("Delete Record").withValue("delete"))
.setMultiSelect(false)
.setContextMenu(true)
.setDropDirection(new MouseBestFitDirection())
.apply(self -> self.addSelectionListener((source, selection) -> {
TableRow<JHomeRatesHistory> tableRow = RowContextMenuMeta.<JHomeRatesHistory>get(self).get().getTableRow();
source.ifPresent(menuItem -> {
menuItem.deselect(true);
switch (menuItem.getValue()) {
case "add":
new DlgSpecials(null).open();
break;
case "delete":
MessageBox.YESNO("Do you really want to delete:\n"+tableRow.getRecord().Notes, true,
l->onDelete(tableRow.getRecord()),
l->{});
break;
}
});
}))))
;
But in a situation where menu is used for a Select, you want the item "selected". It seems that maybe this will require another MenuItem type, something like ToggleMenuItem or a property toggleEnabled, etc.
Describe the bug
A simple menu item (ie: file->open) shouldn't stay selected
To Reproduce
run the demo app, simple menu, click on open, then inspect note that the menuitem has
dui-menu-item-selected
Expected behavior
unless the menu is a toggle menu type, it shouldn't stay selected
The text was updated successfully, but these errors were encountered: