Muetze42 / nova-radio-field

A Radio Buttons field for Laravel Nova.
https://novapackages.com/packages/norman-huth/nova-radio-field
MIT License
5 stars 2 forks source link

Resource is not updated correctly, when 0 is used as an option key #21

Closed b-ssr closed 11 months ago

b-ssr commented 1 year ago

When I set 0 (zero) as one of the option keys (as shown in the example below) and select the corresponding option to update the resource, it fails to update. The option with the key 0 (zero) is ignored, and the first option is used instead.

Radio::make('Status', 'status')->options(['1' => 'Show', '0' => 'Hide']);

Is this the expected behavior or is it a bug?

Muetze42 commented 11 months ago

Sorry. Overlooked and just realised it myself. But it won't be until this weekend.

Muetze42 commented 11 months ago

https://github.com/Muetze42/nova-radio-field/releases