outl1ne / nova-settings

A Laravel Nova tool for editing custom settings using native Nova fields.
MIT License
271 stars 100 forks source link

dependsOn doesn't work for attributes in settings #138

Open om0x1ar opened 1 year ago

om0x1ar commented 1 year ago

Hello, the dependsOn method doesn't work for any of the fields inside the settings resource as the update-field request returns 404.

image

KasparRosin commented 1 year ago

As an quick alternative, I think we should have support for outl1ne/nova-dependency-container I personally haven't used it in a while inside nova-settings, so it might need testing to see whether some nova release could have broken it.

chrillep commented 1 year ago

second this. not even getting any error logs :) sends : PATCH to /nova-api/nova-settings/general/update-fields

https://nova.laravel.com/docs/4.0/resources/fields.html#dependent-fields

chrillep commented 1 year ago

https://nova.laravel.com/docs/4.0/customization/fields.html#dependent-form-field

https://github.com/outl1ne/nova-settings/blob/d201cb181dd9c9920be036afc3c95a3e92626b42/routes/api.php#L22

add something like

    Route::patch('/nova-api/nova-settings/{path}/update-fields', [SettingsController::class, 'sync']);

and add sync functionality to SettingsController

chrillep commented 1 year ago

https://github.com/stepanenko3/nova-settings#using-dependson-with-out-package now has dependsOn fields support. Just FYI

shane-smith commented 9 months ago

Just to confirm, this is not implemented yet?

I'm attempting to make a Text field visible only when a Boolean field is true, but dependsOn seems to be ignored.

devskio commented 4 months ago

Hello, any update on this topic? Is there a plan to fix this? Thank you!