decap-cms
decap-cms copied to clipboard
Select widget becomes empty when selecting an option with value 0
Describe the bug
The select
widget allows true numbers (not numeric strings) to be stored by passing an array of { label: string, value: number }
objects as the options
parameter.
However, when an option with a value of 0
is selected in the UI, the field becomes empty, likely due to some bug related to input validation. Since the field becomes empty, if the select
is required
, the entry cannot be saved, otherwise the value saves as null
.
To Reproduce
Create a select
widget and add an option which has any label and a value of 0
.
Attempt to select that option via the UI
Expected behavior
The option with a value of 0
is selected and its label is displayed
Applicable Versions:
- Netlify CMS version: 2.10.192
i would like to work on this issue. please assign it to me.