Render/Re-render table and chart based on select option from CUSTOM PAGE

Hello guys, where can I find the guide/ docs for this one? Is it possible to just render/re-render both my table and chart based on the selected value from on header and the first render on page load will be my choice like for example: MONTHLY.
TIA..
6 Replies
Patrick Boivin
Is this a custom page?
Chrysippus
ChrysippusOP2y ago
yes sir custom page on admin panel, I just extend the page to render the table.
Patrick Boivin
lol, I just noticed the updated title Is this a "free" select on your page, or is it part of a Filament form?
Chrysippus
ChrysippusOP2y ago
the select element came from the blade file of my custom page, I just made it to explained what I wanted.
Patrick Boivin
Ok, makes sense. So I think you can do this with a wire:model attribute on the select. Add a public property on your page class, it will be updated when the value is changed. Then you can access this value in your getTableQuery() method to refresh the table. For the widget, I think you'll need to emit a Livewire event.
Chrysippus
ChrysippusOP2y ago
got it, thankyou!
Want results from more Discord servers?
Add your server