reactive action

Hello, Is it possible with livewire v3 to simulate a page reload, i.e. to update a page action dynamically without reloading the page?
1 Reply
Becker Maxime
Becker MaximeOP13mo ago
Example : I'd like to update this hidden function without reloading my page. EditQuote :
Action::make('paid_deposit_amount')
->label(__('quote-resource.action.paid_deposit_amount'))
->requiresConfirmation()
->url(fn($record): string => route('generate.payement.quote', ['id' => $record->id]))
->openUrlInNewTab()
->hidden(function ($record) {
return !is_numeric($record->artist->vat_rate)
|| !is_numeric($record->deposit_amount)
|| !$record->artist->key_stripe
|| $record->status == Quote::PAID;
}),
Action::make('paid_deposit_amount')
->label(__('quote-resource.action.paid_deposit_amount'))
->requiresConfirmation()
->url(fn($record): string => route('generate.payement.quote', ['id' => $record->id]))
->openUrlInNewTab()
->hidden(function ($record) {
return !is_numeric($record->artist->vat_rate)
|| !is_numeric($record->deposit_amount)
|| !$record->artist->key_stripe
|| $record->status == Quote::PAID;
}),
QuoteResource :
Forms\Components\Select::make('status')
->disabled(function ($record) {
return $record?->invoice;
})
->options([
Quote::UNPAID => 'Non payé',
Quote::PENDING => 'En attente',
Quote::PAID => 'Payé',
])
Forms\Components\Select::make('status')
->disabled(function ($record) {
return $record?->invoice;
})
->options([
Quote::UNPAID => 'Non payé',
Quote::PENDING => 'En attente',
Quote::PAID => 'Payé',
])
Want results from more Discord servers?
Add your server