F
Filament10mo ago
Ander

Wizard still showing "Next" when steps hidden dynamically

I'm trying to hide a step depending on the variable 'applies_to_all_employees,' the step hides, but the 'next' button doesn't change to 'create.' In version 2 of filament, this did work.
protected function getSteps()
{
return [
Step::make(__('bonuses.create.bonus_name'))
->schema(
BonusesResource::getFormSchema('0')
),
Step::make(__('bonuses.create.add_employees'))
->hidden(fn (Get $get) => empty($get('applies_to_all_employees')) ? false : true)
->schema([
Grid::make(['default' => 1, 'sm' => 1, 'xl' => 2])
->schema([
...
])
]),
];
}
protected function getSteps()
{
return [
Step::make(__('bonuses.create.bonus_name'))
->schema(
BonusesResource::getFormSchema('0')
),
Step::make(__('bonuses.create.add_employees'))
->hidden(fn (Get $get) => empty($get('applies_to_all_employees')) ? false : true)
->schema([
Grid::make(['default' => 1, 'sm' => 1, 'xl' => 2])
->schema([
...
])
]),
];
}
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server