Skip to content

Commit

Permalink
use data item id if type doesnt exist
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Feb 27, 2024
1 parent 6604964 commit 540ead2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion haxe/ui/components/pickers/MenuItemPicker.hx
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,12 @@ private class Handler extends ItemPickerHandler {
var existing = builder.menu.getComponentAt(i);
var item = ds.get(i);
var type = item.type;
if (type == null) {
type = item.id;
}
if (existing == null) {
switch (type) {
case "separator":
case "separator" | "menu-separator":
var menuSeparator = new MenuSeparator();
picker.addComponentAt(menuSeparator, i);
case _:
Expand Down

0 comments on commit 540ead2

Please sign in to comment.