F
Filament4mo ago
Jay

The cancel button in a slideOver or modal triggered from an edit table row does not reset the form

Create a Resource file. Sample as below: click row 1 of table row to edit. SlideOver is displayed with correct data. Click Cancel or the X of the slideOver. click row 2 of table row to edit. SlideOver is displayed with data from row 1. This is of course incorrect. Laravel Framework v12.19.3 Filament v3.2 The issue also exists with standard modal view. But for a standard edit page, this works fine!
public static function table(Table $table): Table
{
$settings = app('settings');

return $table
->columns([
TextColumn::make('id')
->toggleable()
->label('ID')
->sortable(),
TextColumn::make('business_stage')
->label('Business Stage')
->sortable()
->searchable(),
])
->modifyQueryUsing(function (Builder $query) use ($settings) {
if ($settings->is_master === 'no') {
return $query->where('admin_setting_id', $settings->id);
}
})
->actions([
Tables\Actions\EditAction::make()
->modalWidth(MaxWidth::Large)
->slideOver(),
Tables\Actions\DeleteAction::make(),
])
->bulkActions([
Tables\Actions\BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make(),
]),
]);
}
public static function table(Table $table): Table
{
$settings = app('settings');

return $table
->columns([
TextColumn::make('id')
->toggleable()
->label('ID')
->sortable(),
TextColumn::make('business_stage')
->label('Business Stage')
->sortable()
->searchable(),
])
->modifyQueryUsing(function (Builder $query) use ($settings) {
if ($settings->is_master === 'no') {
return $query->where('admin_setting_id', $settings->id);
}
})
->actions([
Tables\Actions\EditAction::make()
->modalWidth(MaxWidth::Large)
->slideOver(),
Tables\Actions\DeleteAction::make(),
])
->bulkActions([
Tables\Actions\BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make(),
]),
]);
}
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?