nova-flexible-content icon indicating copy to clipboard operation
nova-flexible-content copied to clipboard

Fix dependent field support

Open wize-wiz opened this issue 1 year ago • 3 comments

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.

wize-wiz avatar Jan 14 '24 20:01 wize-wiz

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 avatar Jan 22 '24 08:01 wize-wiz

@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 avatar May 14 '24 13:05 andrii-trush

@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.

wize-wiz avatar May 15 '24 09:05 wize-wiz