Jack Sleight
Using value from parent livewire component in ViewField
I've added a form to a custom livewire component. The form contains a
ViewField
, and within that view I need to check the value of one of my livewire component's props. I can't just do $complete
, that gives an undefined error. If I pass the value in with ->viewData(['complete' => $this->complete])
it works the first time but it's not reactive, when complete
changes the view is not updated. Any ideas?10 replies
Snapshot missing error with Livewire component in form
I've followed the instructions here https://filamentphp.com/docs/3.x/forms/advanced#inserting-livewire-components-into-a-form to add a custom Livewire component to my form. However when I update other fields in the form that have
->live()
enabled the Livewire component disappears and this error is thrown in the JS console:
Any ideas what's wrong?1 replies
Multiple edit pages for a single resource
I have a resource where I need two completely different edit pages. Whats the best way to approach this? I've already duplicated the edit page class, and I can see that there's a
getForms
method that returns the form from the resource class. Do I just override that to return a different form? Or is there a better way to do it?14 replies
Refresh page data from resource form action
I need to call
refreshFormData
(https://filamentphp.com/docs/3.x/panels/pages#refreshing-form-data) from an action within a resource form, but that method is on the page. How can I access the page component from the action method?21 replies
Custom grid column widths
Is this the best way to give a
Grid
component custom column widths, or have a missed something more official? The child *:
variant is required as the extra classes are applied to the wrapper not the element with grid
set.
1 replies
Passing an ID to a custom edit action
I'm trying to create an edit action on a custom page that allows me to edit a model directly from the page (rather than going to the normal resource page). It mostly works, but I'm running into problems passing the right model ID to the action as an argument. If I hard-code an ID it works perfectly.
124 replies