✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Hide Toggle Columns Button

Is it possible to hide the Toggle Columns button? I need to hide columns to save real estate and have no intentions of displaying them.

If you don’t need the user to be able to control this at all, can you just omit those columns from the columns prop? There’s no problem having extra fields in data that aren’t present in columns, these fields will just be ignored.

Otherwise there’s a hacky solution I can think of: hide it with css. The button has class show-hide, so using the table’s css prop:
css=[{"selector": ".show-hide", "rule": "display: none"}]

2 Likes

Thank you. The css worked perfectly!

I definitely also have this use case, so am now using this CSS.

Well, simply leaving out the column in columns but keeping it in data was the solution for me, thanks!