Delete row error
HI,
I have a json format like :
{"type": "'', "default":'', "options": [{name:'xxx', label:'ooo',fee:100},...]}
This json in db table namely data.
In nova 4 resource, i have call JsonRepeatable class like :
$fields[] = JsonRepeatable::make('data->options')->fullWidth()
->stacked()
->rules([
'array',
])
->fields([
Hidden::make('name')
->readonly(),
Text::make('label')
->rules([ 'required' ]),
Number::make('fee')
->step(0.1)
->rules([ 'min:0', 'max:999999', 'required' ])
]);
In update page, i have click a top row delete button but a last row deleted.The target row no delete.
I have view file(vendor/stepanenko3/nova-json/resources/js/components/Fields/JsonRepeatable/FormField.vue:103) function deleteRow().
console.log(this.value) result is the target row deleted but display is last row deleted.
Can i know how to fix the error to display the correct information?
P.s 1 : I try to fix the error refer https://stackoverflow.com/questions/48484773/splice-not-working-properly-my-object-list-vuejs. Also not working.
I find this https://plainenglish.io/blog/many-ways-to-rerender-a-vue-component-660376d94cc1 can fix the display error.
Use vue v-if to reload display list can display the correct information.
I find this https://plainenglish.io/blog/many-ways-to-rerender-a-vue-component-660376d94cc1 can fix the display error.
Use vue v-if to reload display list can display the correct information.
Please update plugin.
Thanks. I'm too. Thanks.