Silvanite/novafieldcheckboxes

Issue When Update

Closed this issue · 1 comments

For the First Time Every thing is working perfect
But when i try to update checkboxes say un-check one this is fired

image

my implementation is as the follow :

` ->item('alert_new_reservation', function (SettingItem $item) {
$item->name(__('Send an alert when a New Reservation'))
->field(\Silvanite\NovaFieldCheckboxes\Checkboxes::make('alert_new_reservation')
->options([
1 => __('Email'),
2 => __('SMS'),
])
->fillUsing(function ($request, $model, $attribute, $requestAttribute) {

                                return $requestAttribute;
                            })
                        );
                })`

@m2de so far i found the solution for nova v 1.x the issue is in this line inside FormField.vue
this.value.push(option) cause in this case the typeof value is string , i don't know why casting is not working in my model so i had to override FormField.vue component into a custom component then i parsed value in mounted like this
mounted(){ this.value = JSON.parse(this.value); }

for any one had this issue and @m2de thanks for such great work