Hide row action in Relation Manager shown in view page
I have a Relation Manager that appears in view and edit pages.
Prebuilt actions are only shown in the edit page as it should, but after adding a custom action to the RM, this one is shown in both view and edit pages.
How can I hide it in the view page?
Solution:Jump to solution
I managed to do it with this https://discord.com/channels/883083792112300104/1120360746841284800/1120444415748620319
5 Replies
Prebuilt actions seems to hide based on read only mode, but this doesn’t seem to apply to custom actions
Post your action code. You should be able to pass a closure to the
->hidden()
method - not sure whether it will accept the$operation
to test against or the Page $page
to check againstI already had tried with operation but doesn’t seem to be valid there
Solution
I managed to do it with this https://discord.com/channels/883083792112300104/1120360746841284800/1120444415748620319
Thanks either way @Blackpig 🙂