popup
i want to create button in table row and when i click buttoni want to show popup with new table
22 Replies
Use an Action with
->modalContent()
with new tableWhat's the "new table"?
like i have table of workers list
i want to have button somewhere for all workers
and if i click id1 worker button show popup new table about this worker data lets say
i sew this but its not works
also im using v2
I think this is what you need, but instead of "BulkAction" you should use action. https://filamentphp.com/docs/2.x/tables/actions#custom-content
why bulkactions dont show?
i wrote this but its dont showed
->bulkActions([
Tables\Actions\DeleteBulkAction::make('aaa'),
Tables\Actions\BulkAction::make('updateAuthor')
->action(function (Supplier $records, array $data): void {
foreach ($records as $record) {
$record->author()->associate($data['authorId']);
$record->save();
}
})
->form([
Forms\Components\Select::make('authorId')
->label('Author')
->options(User::query()->pluck('name', 'id'))
->required(),
])
]);
Bulk action is for "bulk", check rows using checkbox and on top of table you'll see your bulk actions
okay but i want to be this action always not when i check
try this, in
->modalContent()
you provide your tableoho i made it
i just change bulkaction to action and its works now
thanks Vp ❤️
That's what I said..
hm but
welcome
its possible to make new table inside the action right ?
try like this
i should create view?
and what i should write inside this view?
@Vp
Yes, and inside the view you write your table..
can u give me some example? i have no idea if u have already writted please
Ok, wait
You can reuse the blade components inside the view. But you cannot embed another filament table in the modal
Your HTML/Blade
HTML table...
<table></table>