Is it not possible to have 2 forms inside a resource form?

A really strange bug occurs when having more than one custom livewire component in the resource form. After an update that makes the form rerender the custom component (the first one in my case) is being destroyed. Console throws exception Uncaught Snapshot missing on Livewire component with id: KVKGAH43Jg6EEsDT4839 Note: I have passed a key() to each component
5 Replies
krekas
krekas6mo ago
i think to have two forms you will have to create a custom page
Vazaios
VazaiosOP6mo ago
I do not have 2 forms. I have on form (which is the form of my resource) and then I have 2 custom livewire components that are being rendered inside that form
awcodes
awcodes6mo ago
Is the key changing between requests? Do the components themselves have forms in them?
Vazaios
VazaiosOP6mo ago
No they key is not changing. The components do not have forms in them
tim.lalev
tim.lalev6mo ago
That does sound like a key mismatch try passing your own random key to force rerender
key($getRecord()->id.'-'.Str::uuid())
key($getRecord()->id.'-'.Str::uuid())
Something like that in both livewire components
Want results from more Discord servers?
Add your server