Custom way to hide column, is it a bad practice ?
Hello everyone,
I have an accessor cell that display multiple content, it must display within the cell
a name, email, an organisation type(enum) and badge that inform confirmed account or not (boolean)
I use as accessor the name and email concatened in this column, however, i have table filters that must filter regarding the organisation type (select) and if the user is confirmed (radio button).
I wouldn't mess with the current accessor that is a string of the email and name, but i must find a way to chirurgically target the organisation type and confirmed.
Instead of implementing a custom filter function that i judged maybe too time consuming on my side, i did the following:
I created a column accessor for the organisation type and the confirmed, added a meta field isHidden and apply conditional rendering on the column:
Now i have two possibilities: either i render the cell but hide with css, or i do not render it at all.
Not rendering it would be better in my case so i have the true count of the visible cells, however i am concerned if that could introduce any bug or bad practice since it shouldn't be meant this way.
I wanted to ask if thanks to your experience you'll spot any major red flag doing this approach or potential bug that i could encounter ?
Thanks in advance 👍
0 Replies