F
Filament10mo ago
Noxo

Section - headerEnd

Is there a way to place an action to the headerEnd slot of Section? I tried to do it like this, but it didn't work. Maybe there is another way?
Forms\Components\Section::make()
->heading('Heading')
->description('Description')
->extraAlpineAttributes([
'headerEnd' => fn () => Forms\Components\Actions\Action::make('active')
->action(function () {
//
}),
], merge: true)
->schema([
Forms\Components\TextInput::make('price')
->minValue(0)
->maxValue(config('constants.MYSQL_INT_UNSIGNED_MAX'))
->numeric()
->suffix(config('app.currency'))
->required(),
])
->compact()
->columnSpan(1),
Forms\Components\Section::make()
->heading('Heading')
->description('Description')
->extraAlpineAttributes([
'headerEnd' => fn () => Forms\Components\Actions\Action::make('active')
->action(function () {
//
}),
], merge: true)
->schema([
Forms\Components\TextInput::make('price')
->minValue(0)
->maxValue(config('constants.MYSQL_INT_UNSIGNED_MAX'))
->numeric()
->suffix(config('app.currency'))
->required(),
])
->compact()
->columnSpan(1),
No description
4 Replies
Tieme
Tieme10mo ago
Anyone a workable solution for this question?
krekas
krekas10mo ago
What is this headerEnd?
Noxo
Noxo10mo ago
headerEnd is a slot of Section component
krekas
krekas10mo ago
it needs to be a string so i guess no