Veur
Update Select options after event
@Leandro Ferreira one thing I forgot to mention is that the Select field is a multiple select
->multiple()
And when I remove that, the options are being refreshed using Livewire's $refresh
event. Any idea why it's not working with ->multiple()
?
The solution with dispatchFormEvent()
still won't work btw.24 replies
Update Select options after event
Ok, below is a simplified example:
$fieldsFromDb
is a Collection with fields from the database.
getOptions()
is a method in the FormField model that returns the options for that specific field.
This all works fine, but I don't know how to refresh the list of options.24 replies
Update Select options after event
@Leandro Ferreira yeah, but my form has a lot of Select fields with own options. The options can be edited inside a modal. So, I'm dispatching an event from the modal to the form, but I don't know how to 'refresh' the select component. I tried
$this->dispatch('$refresh');
from the modal, but no luck24 replies
Add an Action to a Form label or hint
@Lara Zeus thanks, I tried that using styling based on parent state (
.group
) and with sibling state (.peer
) but none of that works, as the extra attribute is added to the input element wrapper, and the hint is not a child or sibling.
Do you have any idea?14 replies