OptionsList displays empty row with multiselect=false

Hi,
In your Demo sampler for OptionsList there are 4 examples: 3 of them have an empty row on top of the list (all 3 have multiselect property set to false). The last example is for multiselect=true and looks ok (without an empty row). How can I achieve to display the optionslist without the empty row on top, but multiselect = false?

Thank you very much.

1 Like

Hi, Sorin.

Unfortunately, there is no such ability in the platform. We are going to fix it. See the linked youtrack issue.

As a workaround, you can write the following code in the screen controller to display the OptionsList without the empty row on top


@Inject
private OptionsList optionList;

@Override
public void init(Map<String, Object> params) {
    optionList.unwrap(ListSelect.class).setNullSelectionAllowed(false);
}

Hi,
It’s ok.

Thank you

:ticket: See the following issue in our bug tracker:

https://youtrack.cuba-platform.com/issue/PL-9030