Don't show View button on table row

I have the following code, which opens a modal when I click on the row. It also adds the View button on the row, which I don't want as it takes up space and is unnecessary. Is there any way to tell the system not to show the View button? public function table(Table $table): Table { return $table ->columns([ TextColumn::make('subject') ->wrap() ->searchable(), ]) ->recordActions([ ViewAction::make() ->schema([ TextEntry::make('body') ->state(fn ($record) => nl2br(e($record->body))) ->html(), ]), ]); }
Solution:
```php ->recordActions([ ViewAction::make() ->hiddenLabel() ->icon(null)...
Jump to solution
2 Replies
Solution
bernhard
bernhard4w ago
->recordActions([
ViewAction::make()
->hiddenLabel()
->icon(null)
->schema([
TextEntry::make('body')
->state(fn ($record) => nl2br(e($record->body)))
->html(),
]),
])
->recordActions([
ViewAction::make()
->hiddenLabel()
->icon(null)
->schema([
TextEntry::make('body')
->state(fn ($record) => nl2br(e($record->body)))
->html(),
]),
])
keiron
keironOP4w ago
Beautiful, thanks

Did you find this page helpful?