Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 1 month ago
Unselectable null value in NativeSelect
Creating a new NativeSelect component with null selection allowed lists the empty value correctly, but it cannot be selected. Clicking the empty value doesn't even fire a new ValueChangeEvent. However, setting an item ID for null value with setNullSelectionItemId(<id>) makes the null value selectable. Is this behaviour as intended or am I doing something wrong?
Tested with the following code on a new Vaadin 7.6.4 project:
NativeSelect ns = new NativeSelect("Native select");
ns.addItem("item1");
ns.addItem("item2");
ns.setValue("item1");
ns.setNullSelectionAllowed(true);
ns.setImmediate(true);
layout.addComponent(ns);
Last updated on
You cannot reply to this thread.