Loading indicator when showing/hiding dependent fields via select
Hi all
I've got a form with several hidden sections I switch between using a 'type' select field. The sections have
There's a noticeable delay after selecting an option before the correct section appears. The server is in Europe and I'm in Australia so the latency is pretty high. Moving servers isn't an option unfortunately.
I'd like to add a loading indicator to improve the UX. Ideally, I'd like to remove the currently displayed section as soon as an option is selected (without waiting for the backend request) and show a loading indicator until the new section appears. Which probably means doing something client-side with Alpine...
Any suggestions on how I could do that? Thanks!
I've got a form with several hidden sections I switch between using a 'type' select field. The sections have
->hidden(fn (Get $get) => $get('type') !== ......) on them.There's a noticeable delay after selecting an option before the correct section appears. The server is in Europe and I'm in Australia so the latency is pretty high. Moving servers isn't an option unfortunately.
I'd like to add a loading indicator to improve the UX. Ideally, I'd like to remove the currently displayed section as soon as an option is selected (without waiting for the backend request) and show a loading indicator until the new section appears. Which probably means doing something client-side with Alpine...
Any suggestions on how I could do that? Thanks!
Solution
https://filamentphp.com/docs/3.x/support/blade-components/loading-indicator
Or:
https://v2.filamentphp.com/tricks/forms-loading-inidicator
Or:
https://v2.filamentphp.com/tricks/forms-loading-inidicator
Filament
Filament is a collection of tools for rapidly building beautiful TALL stack apps, designed for humans.