gabrielf5762
gabrielf5762
FFilament
Created by gabrielf5762 on 1/8/2024 in #❓┊help
Filament 3 page with custom livewire forms modals
17 replies
FFilament
Created by gabrielf5762 on 1/8/2024 in #❓┊help
Filament 3 page with custom livewire forms modals
Yes. In the mount method I added $this->form->fill(); request.
17 replies
FFilament
Created by gabrielf5762 on 1/8/2024 in #❓┊help
Filament 3 page with custom livewire forms modals
Is there any tutorial on custom livewire components using multiple modals?
17 replies
FFilament
Created by gabrielf5762 on 1/8/2024 in #❓┊help
Filament 3 page with custom livewire forms modals
So I see the buttons, I click on one, the modal shows up, the form is displayed with validation, I fill in the form click save, the modal closes but because of the JS error above I cannot click on another button.
17 replies
FFilament
Created by gabrielf5762 on 1/8/2024 in #❓┊help
Filament 3 page with custom livewire forms modals
Now I have a new issue: so I have multiple buttons each opening the same livewire component form and after one modal is closed I get a JS error "livewire.js?id=f121a5df:4351 Uncaught Snapshot missing on Livewire component with id: XXXXXXXXXXXXXXX". The XXXXXXXXXX is the wire:id for each button (which I believe should be different) and this causes all the buttons in the page to stop working.
17 replies
FFilament
Created by gabrielf5762 on 1/8/2024 in #❓┊help
Filament 3 page with custom livewire forms modals
2. Before the create function closes in the child I issue $this->form->fill(); which should reset the form
17 replies
FFilament
Created by gabrielf5762 on 1/8/2024 in #❓┊help
Filament 3 page with custom livewire forms modals
1. I dispatch an event that in the parent Filament page will trigger a method that refreshes the base model ID which reloads the content and shows the new entry
17 replies
FFilament
Created by gabrielf5762 on 1/8/2024 in #❓┊help
Filament 3 page with custom livewire forms modals
Thank you very much for your support. Unfortunately none worked but I believe I found something useful: In the livewire modal in the create function I create the record in the database and I do 2 things:
17 replies
FFilament
Created by gabrielf5762 on 1/8/2024 in #❓┊help
Filament 3 page with custom livewire forms modals
Just a quick note I am using Livewire 3 and I just realized that in Livewire 3 emit has been replaced by dispatch. Now the last issue is how to close the modal and re-render the parent.
17 replies
FFilament
Created by gabrielf5762 on 1/8/2024 in #❓┊help
Filament 3 page with custom livewire forms modals
The refresh is not working. I am still searching for something similar.
17 replies
FFilament
Created by gabrielf5762 on 1/8/2024 in #❓┊help
Filament 3 page with custom livewire forms modals
getState worked like a charm: $this->form->getState() before the create query.
17 replies
FFilament
Created by gabrielf5762 on 1/8/2024 in #❓┊help
Filament 3 page with custom livewire forms modals
Thank you for your prompt reply.
17 replies