Hide table column based on value of another column
How can I do this? In ->hidden(), I tried a closure passing the $record and accessing the attribute, and I tried passing Get and using $get('name'), but the first way passed null to the closure and the second told me "Typed property Filament\Forms\Components\Component::$container must not be accessed before initialization"
Solution:Jump to solution
hide a table column based on a form might be possible.. but you cant hide a column per record because a table holds multiple records.. thats impossible for any table
7 Replies
that is a clue. Yes, I am trying to hide a table column:
I think you can't show/hide a column by rows
Solution
hide a table column based on a form might be possible.. but you cant hide a column per record because a table holds multiple records.. thats impossible for any table
right
that makes sense
so I would use state to send a blank string on the rows
Thanks!
yeah, I was already using state so I just added a conditional and it works like a charm