Files
nutzwerte_fi4/SNIPPETS.md
T
2026-04-14 11:46:19 +02:00

30 lines
1.0 KiB
Markdown

TextColumn::make('flaeche')
->numeric(
decimalPlaces: 2,
decimalSeparator: ',',
thousandsSeparator: '.'
)
// ->updateStateUsing(function ($record, $state) {
// return $record->update(['flaeche' => str_replace(',', '.', $state)]);
// })
// ->extraInputAttributes(['onClick' => 'this.select()'])
->summarize(Sum::make()->label('Gesammt')->numeric(
decimalPlaces: 2,
)->suffix(new HtmlString(' m²')))
->suffix(new HtmlString(' m²'))
->width('2rem')
// ->rules(['required'])
->alignment('right')
->label('Fläche')
->searchable(),
// ->validationMessages([
// 'required' => 'Die Eingabe einer Fläche ist erforderlich.',
// 'decimal' => 'Für die Fläche sind zwei Dezimalstellen erforderlich.',
// ])
// ->afterStateUpdated(function (Component $livewire) {
// $livewire->dispatch('refreshProjektAllgemeinflaechen');
// }),
GOOD TURORIAL AND WIKI
https://mintlify.wiki/filamentphp/filament/advanced/custom-actions