Trying to access a column titles to populate a dropdown
I'm fairly new to TanStack table so please forgive me if this is a simple thing to achieve.
I'm having trouble accessing a column's title to populate a dropdown menu which will toggle that columns visibility. At present I pass in the title to a
I then have a
I understand I may need to do some refactoring here but is there a way to do this? Thanks
I'm having trouble accessing a column's title to populate a dropdown menu which will toggle that columns visibility. At present I pass in the title to a
DataTableColumnHeader component through the header property of my columns definitions object:I then have a
DataTableViewOptions component which loops over each column using the getAllColumns method and filters the columns that can be hidden. I can only seem to access the column.id property though:I understand I may need to do some refactoring here but is there a way to do this? Thanks