table column visibility base on record
I am trying to set the table column visibility base on some record, but it's showing error
Argument #1 ($record) must be of type App\Models\Candidate, null given
What I've tried:
But the same function for ->visible()
is working fine in actions
My code which is working for action:
So, what should be the error here?Solution:Jump to solution
This was asked quite some times here. You cannot hide table columns based on a record, because that would result in a bad table layout.
3 Replies
Solution
This was asked quite some times here. You cannot hide table columns based on a record, because that would result in a bad table layout.
ok, thanks for fast respond.. I'll just set placeholder then.. thank you
Just thought I'd add a use case that maybe wasn't considered. I'm using the Table builder with a non-traditional table layout and not being able to hide an empty field using the callback record makes my layout wonky.