How to show Select field reactive value in other site of a template?
Hi, i have a Select field, and I want to show the value of this select in other site of the template. How can I do that? I try
afterStateUpdated
? It's possible to do it with alpine?11 Replies
Can you explain a little more, it sounds like you can do this with a closure with afterStateUpdated setting or getting options.
I have a component with a select in a modal.
And as you can see, I want to set the value of the select component ($getStatusComponent()) in the trigger <a> that opens the modal
Why not use a filament action?
What do you mean? I'm not following you.
Where are you using this?
Into a custom component.
this is a part of the code of the custom component template
And in the custom component controller i set the select in this function:
The select is printed ok, and the value is saved and filled ok, but i want to show the value in $statusValue
@toeknee_iom Finaly I solve making the select reactive and geting the value from state.
π good stuff! Thanks for letting us know π
Hi @toeknee_iom.
In this way the change is quite slow. Do you know of a way to do the same with js?
{{ $this->form }} ?
https://filamentphp.com/docs/2.x/forms/getting-started#preparing-your-livewire-component
Filament
Getting started - Form Builder - Filament
The elegant TALL stack form builder for Laravel artisans.
Well, that's how Livewire works. Everything is a server request