gregnb / mui-datatables

Datatables for React using Material-UI
MIT License
2.71k stars 934 forks source link

Sort alphabetically the columns in the viewcolumn dialog. #1987

Open cristiandaulisio opened 1 year ago

cristiandaulisio commented 1 year ago

Is it possible?

Thanks

gitMkara commented 1 year ago

you can display the sorted data coming from your BE by using onTableChange: (action, tableState) => {...}.

cristiandaulisio commented 1 year ago

if i change the column inside tableState i change the column order in table AND the column order in ViewColumn dialog.

i want change ONLY the label in viewColumn dialog immagine

but not the order of the column in table.

gitMkara commented 1 year ago

I see. You can use <MUIDataTable components={...} />. You're able to pass custom components to there. For example, copy TableToolbar codes in this repo, change wherever you want. in my opinion, it'll be helpful for you.