Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show hidden columns only in editing or creation mode using material-table react?

Hi I using https://github.com/mbrn/material-table and I want to show hidden columns only in editing or creation mode, this is possible?

like image 560
Murilo Fernandes Avatar asked Sep 07 '25 03:09

Murilo Fernandes


1 Answers

use columnsButton in the options prop: https://github.com/mbrn/material-table/blob/master/types/index.d.ts#L300

This will enable a button in the toolbar to toggle columns: enter image description here

like image 162
Domino987 Avatar answered Sep 10 '25 20:09

Domino987