Open Meghna2528 opened 4 years ago
radioButton.clear(); radioButton.setSelectedItem(null);
This need has come up a lot. +1.
(Or double clicking a radio button should deselect it).
Never seen this before, not sure we wanna do that.
This might be not needed if we fix vaadin/vaadin-radio-button-flow#67 and make sure that setValue(null)
actually works.
We have the problem now, that setValue(null) clears the values. We want to display null as an explicit option when using radio buttons. However, clicking on the null value clears the selection, which is missleading, as the null value is indeed selected.
radioButton.clear(); radioButton.setSelectedItem(null);
Nothing works when trying to reset radio buttons. (Or double clicking a radio button should deselect it).