No default in RadioButtonGroup
I would like to be able to show a RadioButtonGroup with none of the radiobutton preselected. Currently I'm doing this by setting the selectedIndex to number of radiobuttons (e.g. selectedIndex = 3 if there are 3 radiobuttons). As the selectedIndex is zero-bound, this number is actually out of bounds, however instead of an error message, this will clear the default selection and show only non-selected radiobuttons.
This work-around is currently mentioned inseveral answers on SDN, but it is not an officially documented feature. To make sure that this undocumented feature, which is apparently being used in several UI5 application, is not broken at a certain point in time, it would be great if this feature would be documented and supported officially.
In case this work-around is not the way to go, it might be necessary to make such feature available in another fashion.
tracked internally: 1580057912
Hi,
the functionality was implemented and will be available with the next patches for release versions 1.30 or greater. You will be able to create a sap.m.RadioButtonGroup and if you explicitly set its selectedIndex property to -1 the group will have no selection.
Regards, Marin
Thanks Marin! Great job :)
selectedIndex to '-1' didn't work with version 1.28.9 There will any solution for version 1.28.9?