How to disable clickable row ? #6189
-
i tried protected function getTableRecordUrlUsing(): ?Closure on my resource, seems not working. |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 15 replies
-
Hi @Terefai Instead of adding in the main resource, you have to add in your List class.
use Closure;
class ListPlans extends ListRecords
{
// ...
protected function getTableRecordUrlUsing(): ?Closure
{
return null;
}
} |
Beta Was this translation helpful? Give feedback.
-
The
protected function makeTable(): Table
{
return parent::makeTable()->recordUrl(null);
} |
Beta Was this translation helpful? Give feedback.
-
it still can click the row. How do I disable it? so it can't be clicked. |
Beta Was this translation helpful? Give feedback.
-
i've overridden not a huge deal, but would be cool if maybe at the table-level we could have a method like |
Beta Was this translation helpful? Give feedback.
-
XXXResource Class > static function table > return $table
|
Beta Was this translation helpful? Give feedback.
-
public static function table(Table $table): Table
{
return $table
->recordAction(null) // => works for me. ✅
->columns([])
->filters([])
->actions([
EditAction::make()->closeModalByClickingAway(false),
])
->bulkActions([
BulkActionGroup::make([
DeleteBulkAction::make(),
]),
]);
} |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
This option not work for me :( |
Beta Was this translation helpful? Give feedback.
-
Use it ->recordUrl(null) |
Beta Was this translation helpful? Give feedback.
Hi @Terefai
Instead of adding in the main resource, you have to add in your List class.
PlanResource > Pages > ListPlans