Empty value/row option in combo, select & co

This is a feature request.

If i understand well, actually to allow empty id option in combo or select we have to do hacking things with specific server side process :
set option id to “-1” and replace -1 by null or empty before saving to database.

Why not adding an option “empty: true” to the component which automatically add an an empty option at top ?
(Ideally we could also have “empty:‘string’” to display a text instead of empty.
Then, when this “special” option item is selected the value of component would be setted to empty.

Can you consider submit this request to votes in your trello board ?

Thanks

Hi Fabien,

“empty” property is a good idea. But id can not be 0. Therefore, we will add support for an additional property in options (“key” for example) that can be 0 and can be used as a selected value instead of “id”.