Filament table driven by JSON data
Hi everyone, I'm trying to come up with a solution to implement a custom page (see attached screenshot).
The page will behave like a form, so to speak. Any edits won't affect the data in the DB until the user explicitly clicks "Save" below.
There are 2 components in the page:
A) Where the user defines some rules to batch update the values in B
B) Something that looks like a Table but is driven by JSON data instead of Eloquent models
As far as I understand, a regular table won't work for 2 reasons:
- it's designed to work with Eloquent queries and models
- the ability to edit directly in each row will save on update, instead of waiting for a page-level Save action
I'm just curious to know if anyone has any pointers on how to approach this? I'm prepared to implement a custom solution in Livewire/Alpine but I'm wondering if there's anything I might have missed in Filament's Table that could help me.
3 Replies
If that makes any sense, I guess that B here would act a bit like a repeater field... Being able to initialize it from JSON, interact with it in the page, and serialize it back to JSON on save, for processing in a dedicated service.
potentially #table-repeater
Looking good, thank you!