addaction - refresh repeater
If I use
->addaction
to customise the addition of a repeater, how do I make it so that repeater refreshes with the latest data.
At the moment, the data is going into the database, but I have to close the form down and re-open to see the new entry.3 Replies
are you using a relationship? Could you share the code that you are using?
Yes I am using a relationship, here is the code excerpt:
Taken out chunks of irrelevance.
My
addAction
is adding the database record without issue. I suppose I could just add the data to the form as well ? (not sure exactly how).
Just feels like there is likely to be a command somewhere to refresh the form.
I'm using a Modal, rather than the Edit\View Page.
Update...I've decided I'm trying to hack too much here. What I really want is a table within an infolist or a form, rather than trying to use a repeater.
I'm not that confident with livewire, so not too keen on going into custom livewire pages\modals. However, I have worked out that I can add a ViewField
to a form, and then call a table widget from the corresponding blade.
This gives me more function than before, so happy with that for now.Maybe this can help you
https://discord.com/channels/883083792112300104/1313505581436244019/1313797927226966036
try to inject
$component
and use this after creating the record