From 540ead28ec0b59fffa627d8d4156c7f4b141fc51 Mon Sep 17 00:00:00 2001 From: Ian Harrigan Date: Tue, 27 Feb 2024 11:08:58 +0100 Subject: [PATCH] use data item id if type doesnt exist --- haxe/ui/components/pickers/MenuItemPicker.hx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/haxe/ui/components/pickers/MenuItemPicker.hx b/haxe/ui/components/pickers/MenuItemPicker.hx index 79f182e94..b4cf24dbc 100644 --- a/haxe/ui/components/pickers/MenuItemPicker.hx +++ b/haxe/ui/components/pickers/MenuItemPicker.hx @@ -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 _: