ComboBox in options
I'm trying to show a combo box with an empty default choice but the UI shows some funny line on top for an empty string.
code:
List<Options.OptionValue> optionValues = ((DefaultAlignmentDocument) documents[0].getDocumentOrCrash()).<SequenceDocument>getSequences().stream().map(sequence ->
new Options.OptionValue(sequence.getName(), sequence.getName())).collect(Collectors.toList());
optionValues.add(0, new Options.OptionValue("none", ""));
options.addComboBoxOption("sequence", "Sequenceyyy", optionValues, optionValues.get(0));
0
-
Empty is a bit ambiguous so we would normally use something like "<html><i>None</i></html>" instead.
However, you can have an empty value without the ugly line if you put a space (" ") in for the label instead of an empty string:
optionValues.add(0, new Options.OptionValue("none", " "));
0 -
I ended up adding a space and it seems to work well. Thank you
0
Please sign in to leave a comment.
Comments
2 comments