Booltje124
include a summary in export action
I have an export with currency values in it. I want a summary cell on the bottom with the total of all currency values. Is there a way to do this with the filament exporter.
public static function getColumns(): array
{
$convert = new CurrencyConverterService();
return [
ExportColumn::make('order_created_at')
->label('Order date'),
ExportColumn::make('increment_id')
->label('Ordernumber'),
ExportColumn::make('invoice_number'),
ExportColumn::make('company'),
ExportColumn::make('grand_total') <------------ I WANT THIS COLUMN WITH A SUMMARY ON THE BOTTOM
->formatStateUsing(fn (string $state): string => $convert->convertCentsToEuroNL($state)),
ExportColumn::make('magento_status'),
];
}
4 replies
Reset table pagination after reactive property changes
I have a Reactive User property that I use in a table query to fetch Quotes. When I click on page 11 for one user, then switch to another user who only has 6 pages, the table is stuck on page 11, showing an empty page.
#[Reactive]
public User $user;
>query(Quote::query()->where([
['user_id', '=', $this->user->id],
['status', '!=', QuoteStatus::Open],
])
How can i fix this issue?
6 replies
Override default precision of 2 digits alpine mask
Hi!
I am using the alpine input mask, and it work fine!
Is there a way to override the default precision of 2 digits (to 4) for a TextInput?
Alpine has this mask: <input x-mask:dynamic="$money($input, '.', ',', 4)">
This is not working:
TextInput::make('price')
->required()
->numeric()
->mask(RawJs::make('$money($input, '.', ',', 4))'))
->stripCharacters(',')
->prefix('$'),
Thanks!
3 replies