Hide some columns in the table and show them in the view columns
Expected Behavior
some columns are set to be unchecked from the view columns dropbox
Current Behavior
Code Snippet
`const emptabledisplay = props => { const { columns } = props.data;
const { data } = props.data;
const options = { filterType: "dropdown", responsive: "scroll" };
return ( <MUIDataTable title={"Employee list"} data={data} columns={columns} options={options} /> ); };
export default emptabledisplay; `
Are you looking for these options?

yes I think so but how can i use it properly into my code
columns data looks like this
up to like 100
Take a look at the customize-columns example. You will need to use a structure like that.
I saw your response to a similar issue here #511 I managed to do it like this. `onst emptabledisplay = props => { const { columns } = props.data;
const { data } = props.data;
const options = { filterType: "dropdown", responsive: "stacked", rowsPerPage: 30 }; const headers = columns.map((value, key) => { if (key <= 12) { return { name: value, options: { display: true } }; } else return { name: value, options: { display: false } }; }); return ( <MUIDataTable title={"Employee list"} data={data} columns={headers} options={options} /> ); };
export default emptabledisplay;
like this the first 10 columns will be checked and the rest are unchecked

@gabrielliwerant is it possible to group the columns by a "theme" lets say Cars
- Basic info
- Technical specification
- Gadgets
And then have a "show/hide all" button next to different headers? Lets say I only want to see the columns about gadgets? I have 50 columns in my table and they are "themed" and interesting for some users but not all. Would be nice to give them each a header and make de-select easy.
@forssellm The functionality to group related columns does not exist at the moment, but you can create your own column headers with customHeadRender in the column options, and you can add buttons and functionality there if you wish. It should be possible for you to add what you're talking about with that, albeit it might be a bit of effort.