F
Filamentβ€’15mo ago
josef

Table on resource edit page?

I want to show related records on a resource's edit page/form, without a possibility to edit them. Can I disable editing and deleting for the relation manager, or is there a way to add a table to the form page? Widget?
2 Replies
toeknee
toekneeβ€’15mo ago
Use the relation manager but change from edit to view on the fiunction table, under actions change EditAction to ViewAction and wolla. You can also update the record to be clickable with
protected function getTableRecordActionUsing(): ?Closure
{
return fn (): string => 'view';
}
protected function getTableRecordActionUsing(): ?Closure
{
return fn (): string => 'view';
}
if you render the action too.
josef
josefβ€’15mo ago
Thanks! πŸ™‚