refresh select after suffixAction completed
I need to refresh my select options after the suffix action is completed. How would I accomplish this? Maybe using afterStateUpdated()?
Select::make('quickbooks_vendor_ref_id')
->required()
->label('Vendor')
->options($this->getVendors())
->live()
->preload()
->searchable()
->loadingMessage('Loading vendors...')
// ->afterStateUpdated() <--maybe use this to get the drop down to rerender after force refresh.
->suffixAction(
Action::make('refreshVendors')
->label('Refresh Vendors')
->icon('heroicon-o-arrow-path')
->action(fn () => $this->getVendors(true))
),->options(fn () => $this->vendors)