d3v1anX
how to open edit modal from link?
hey guys,
I implemented a filament table into a livewire component. On it there is a edit modal for each entry.
Now I want to create a link on another page to this table, which opens the edit modal for an entry directly.
I tried so many things like "&id=XXX" and checking in mount of livewire if request()->has('id') -> then try to "mountTableAction('edit', XXX)" but this will not work because Table is not initalized on mount.
Then I tried to call with a direct link to "action=edit" like you can do with "action=create", but this won't work with integrating in livewire.
Now I'm struggeling with some kind of Javascript to $wire.call('mountTableAction'...) but this also does not work and I think it surely can be easier.. 😄
Has anyone an idea how I can call the edit modal for a record after loading the table?
4 replies
Open modal after page load
Hey guys,
I have a table which has only modal (slideOver) to edit / create entries.
Now I'd like to create a button from another resource to the target resource and open directly after loading the "create" modal.
My code until now:
if I try to "create" instead of index it shows an error, because the route does not exists. -> its just a modal 🙂
Has anyone an idea? Maybe I can react on the parameter and open the modal somehow after loading the table?
4 replies
Standard Create Action in modal
Hey guys,
I want to get the standard action for creating an entry in a resource to get this into a modal.
I already got this by removing the create route in getPages().
Is this intended? Or is there a better way?
The problem is now I don't know how to handle the record creation before saving.
8 replies
Saving relationships on livewire Action
Hey guys,
I have a strange situation. I created a livewire component with Filament-Actions.
My action looks like this:
blade file:
Problem is, that the "teams" relationship will not be saved and is even not available at $form->getState()
What am I missing? 😮
9 replies
createOptionUsing on select not called in livewire component
Hey guys,
I tried to add a form to a livewire component which works really well.
Now I created a select field (Tag) with a relationship with the option to add a new Tag.
I created "createOptionForm" on the select which is working fine and I wanted to include a logic, that it returns firstOrCreate on that creation.
I added "createOptionUsing" as well, but unfortunately this method is not called somehow. I don't know why this is not working.. :/
Has someone an idea?
My code:
blade:
9 replies
Bug? Custom summarize with groups
Hi, I don't know if this is maybe a bug:
I have the following table-code:
The summarize function works as expected on the buttom of the table. Unfortunately the group-summaries seems like there is something wrong.
Already found: https://github.com/filamentphp/filament/issues/7578 but it seems already solved by @Dan Harrin - I don't know it this is related to it.
Has anyone an idea? Or is it possible to customize the summarize-function just for the groups?
6 replies
if in x-filament component creating error
Hey guys,
I don't know how to for my problem.
I want to use a component of x-filament and try to add attributes based on an if statement. unfortunately it throws an error and I don't understand why?
Could you have a look please?
https://flareapp.io/share/Bm0Z0g67
If I remove the if statement it works fine.. 😮
2 replies
Two TextColumns from same field
Hey guys,
I tried to add two TextColumns from the same date field. One with only date, the other with the time.
Looks like this:
there only the second field will be displayed.
I tried to change the name and use state for displaying data - this will display both fields, but then it is not sortable / searchable, because the sort field is used from "make".
Is my approach to display two fields of one column correct? Or am I missing something? 🙂
Thank you very much!
4 replies
NavigationItem group is visible even if no item is visible
Hey there, according to https://beta.filamentphp.com/docs/3.x/panels/navigation#registering-custom-navigation-items the group is visible, even if the conditionally hide is true for all items. Is there any chance to hide the group as well?
4 replies