Skip to content

Commit

Permalink
fix type filter
Browse files Browse the repository at this point in the history
  • Loading branch information
3x1io committed Sep 12, 2024
1 parent 841718c commit 82c5886
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Resources/TypeResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,14 @@ public static function table(Table $table): Table
->label(trans('filament-types::messages.form.for'))
->options(static::getTypes())
->searchable()
->preload()
->afterStateUpdated(function (Forms\Set $set){
$set('type', null);
$set('parent_id', null);
})
->live(),
Forms\Components\Select::make('type')
->label(trans('filament-types::messages.form.type'))
->disabled(fn(Forms\Get $get) => empty($get('for')))
->options(fn(Forms\Get $get) => $get('for') ? static::getTypes($get('for')) : [])
->searchable(),
Forms\Components\Select::make('parent_id')
Expand Down

0 comments on commit 82c5886

Please sign in to comment.