nova-flexible-content
nova-flexible-content copied to clipboard
Fix dependent field support
As discussed in #492.
Basically adds a routes/nova-api.php to patch the native /nova-api/{resource}/{resourceId}/update-fields route with a src/Http/Controllers/UpdateFieldController extending the Novas Laravel\Nova\Http\Controllers\UpdateFieldController, using a modified sync version only if the $request->query('field') is a flexible field.
Let me know if anything else should be done.
Added the creation-fields to the list of routes being overwritten. Need some time to build a scenario to find out where the pivot-field routes are being called to support these as well.
@wize-wiz I have detected an issue. As soon as You are in edit mode of the resource, it doesn't show dependedOn elements until You deselect and then select again.
Looks need to rewrite this route too Route::get('/{resource}/{resourceId}/update-fields', UpdateFieldController::class)
@andrii-trush He ho, I didn't had any issues in edit-mode, are you using the latest commit? https://github.com/whitecube/nova-flexible-content/pull/497/commits/abcf902a48f30b720c0780521f0f4120530ef01f
I'm also not going to work on Nova or anything related to Nova anymore.
Since this package wasn't the only troubled thing, it seems Nova isn't going anywhere soon the way it handles 3rd party packages. It's the same mess since 3 years ago I last used Nova for a project.
I've since switched to Filament and it's by far the best thing available.