OwenMelbz / nova-radio-field

Provides a radio field for laravel nova with ability to toggle field visibility.
34 stars 31 forks source link

Array is not updated #18

Closed Jun-ocx closed 3 years ago

Jun-ocx commented 4 years ago

First of all, this package is awesome! I appreciate but I encounter an issue

RadioButton::make('Enable Service','services')
                ->options(
                    [
                        3 => ['Client' => 'FAAS'],
                        5 => ['Marketplace' => 'Shopify']
                    ]
                )
                ->stack()
                ->default(3)
                ->required()
                ->sortable()
                ->hideFromIndex(),

These value stored as an array in DB ex) [3] OR [5] under services column but in update page, the selected option is gone. Screenshot is attached

Screen Shot 2020-09-17 at 10 28 33 AM

OwenMelbz commented 4 years ago

Hi @Jun-ocx

Just to confirm, these are saving correctly, but just not displaying correctly on the edit screen?

Could you try replacing the key names with strings as a test please?

e.g.

'3' => ['Client', 'FAAS]