Widget Table

I'd like to create a modal that allows me to open the form. What can I do?
class TracksEvent extends TableWidget
{
protected static string $view = 'filament.resources.event-resource.widgets.tracks-event';

public ?Event $record = NULL;
protected int|string|array $columnSpan = "full";

public function addTracks()
{

}

protected function getTableHeaderActions(): array
{

return [
Action::make('import_playlist')
->label(__('event-resource.widget.tracks-event.action.import_playlist'))
->modalHeading("Ajouter des dates d'absences")
->requiresConfirmation()
->button()
->action('addTracks')
->form([
Select::make('tracks.playlist')
->relationship('tracks')
->required(),
]),
];
}
class TracksEvent extends TableWidget
{
protected static string $view = 'filament.resources.event-resource.widgets.tracks-event';

public ?Event $record = NULL;
protected int|string|array $columnSpan = "full";

public function addTracks()
{

}

protected function getTableHeaderActions(): array
{

return [
Action::make('import_playlist')
->label(__('event-resource.widget.tracks-event.action.import_playlist'))
->modalHeading("Ajouter des dates d'absences")
->requiresConfirmation()
->button()
->action('addTracks')
->form([
Select::make('tracks.playlist')
->relationship('tracks')
->required(),
]),
];
}
Solution:
What’s the issue with that?
Jump to solution
4 Replies
Solution
Dennis Koch
Dennis Koch9mo ago
What’s the issue with that?
Becker Maxime
Becker Maxime9mo ago
When I click on the button, nothing happens, even though it's supposed to open a modal window. In v2, it worked.
Dennis Koch
Dennis Koch9mo ago
Hm. Not sure what changed. Did you have a custom view in v2, too? Might need the modal code
Becker Maxime
Becker Maxime9mo ago
yes it's the same code as for v2 but when I click it nothing happens at all*
Want results from more Discord servers?
Add your server
More Posts