Closed
Description
ComponentFlow flow = componentFlowBuilder.clone().reset()
.withSingleItemSelector("single1")
.name("Single1")
.selectItems(singleSelectItems)
.and()
.withMultiItemSelector("multi1")
.name("Multi1")
.selectItems(multiSelectItems)
.and()
.build();
In multiple choice, selectItems
accepts a list type, but in a single selection, it accepts a map. Map will cause the final display order to be inconsistent with the order in which it was added, which makes me confused why it was designed as a map.
btw, if you use SingleItemSelector directly without component flow, you still use list to build the selectItems. It works well without any surprises.
SingleItemSelector<String, SelectorItem<String>> component = new SingleItemSelector<>(getTerminal(),
singleSelectItems, "testSimple", null);