ยฉ 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filamentโ€ข3y agoโ€ข
4 replies
ConnorHowell

Default clickable row action

I've got a resource with both edit & view actions on the table row; I've tried overriding the default click action using the 'recordAction' method but it still defaults to view instead of edit.

Here's the table method, I can't tell if I'm being stupid/missing something glaringly obvious ๐Ÿ˜…

public static function table(Table $table): Table
{
    return $table
        ->columns([
            Tables\Columns\TextColumn::make('name')
                ->searchable()
                ->sortable()
        ])
        ->paginated(false)
        ->filters([
            //
        ])
        ->recordAction('edit')
        ->actions([
            Tables\Actions\EditAction::make(),
            Tables\Actions\ViewAction::make(),
        ]);
}
public static function table(Table $table): Table
{
    return $table
        ->columns([
            Tables\Columns\TextColumn::make('name')
                ->searchable()
                ->sortable()
        ])
        ->paginated(false)
        ->filters([
            //
        ])
        ->recordAction('edit')
        ->actions([
            Tables\Actions\EditAction::make(),
            Tables\Actions\ViewAction::make(),
        ]);
}
Solution
public static function table(Table $table): Table
{
    return $table
        ->columns([
            Tables\Columns\TextColumn::make('name')
                ->searchable()
                ->sortable()
        ])
        ->paginated(false)
        ->filters([
            //
        ])
        ->recordAction('edit')
        ->recordUrl(null)
        ->actions([
            Tables\Actions\EditAction::make(),
            Tables\Actions\ViewAction::make(),
        ]);
}
public static function table(Table $table): Table
{
    return $table
        ->columns([
            Tables\Columns\TextColumn::make('name')
                ->searchable()
                ->sortable()
        ])
        ->paginated(false)
        ->filters([
            //
        ])
        ->recordAction('edit')
        ->recordUrl(null)
        ->actions([
            Tables\Actions\EditAction::make(),
            Tables\Actions\ViewAction::make(),
        ]);
}
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel โ€ข Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Clickable defaultGroup, instead of row
FilamentFFilament / โ“โ”Šhelp
2y ago
Make single row not clickable
FilamentFFilament / โ“โ”Šhelp
3y ago
V3 clickable row at widget
FilamentFFilament / โ“โ”Šhelp
3y ago
Clickable row add to bulk select
FilamentFFilament / โ“โ”Šhelp
2y ago