whitecube / nova-flexible-content

Flexible Content & Repeater Fields for Laravel Nova
MIT License
780 stars 229 forks source link

Cannot save resource when Flexible field is hidden using dependsOn #458

Open HeadStudios opened 1 year ago

HeadStudios commented 1 year ago

When a flexible field (with prefilled values) is hidden using dependsOn I cannot save my resource - once I click the checkbox to display it I can save it. I don't know how to allow the user to save a resource without having to check the 'Video' checkbox to make the flexible field visible.

Gist: https://gist.github.com/HeadStudios/2ae6f6e203c30ae041567de9068dd399

Video for context: https://share.getcloudapp.com/OAulKGqW

UPDATE: Tested for Boolean dependsOn also https://gist.github.com/HeadStudios/94359538201a96a42cdaa8057e7ed234

compressed-boolean

HugoHeneault commented 7 months ago

Same issue here, have you found a way to fix it? :)

HeadStudios commented 7 months ago

Hi Hugo,

Thanks for your response - I have still been unable to fix this - it's a great plugin except for this one minor thing. If you work it out do let me know (have followed you on Github).

felixgilles commented 5 months ago

Hi, same issue for me.

The error seems to have been caused by the execution of the fill method in FormField.vue

Note that if, before saving the resource, we change the select on which the flexible depends so that it is displayed, and then return to the desired value, the save is completed.