How to access row data in relationship manager
I want to make column visible based on field value but cannot work out what to use?
I have tried ->visible(function($record) {... but $record is null
Thanks in advance 🙂
6 Replies
This has been asked numerous times already. It’s not possible because it doesn’t make sense to hide columns per row
Maybe I am not explaining correctly - I have a row which may or may not have a related item (seat number) - I am displaying a link on this table row "Change Seat" with a custom link - which I only want to appear if the seat number exists.
?
That should be enough
->url(fn ($state) => filled($state) ? 'Your url' : null)
I recommend using
formatStateUsing
because if you are utilizing the url
property, the row value would correspond to the seat_number
, rather than the text "Change Seat."Thanks guys, I'll give those a go today