Learn more from guides & API docs
Catch up with the latest on the blog
Try our many live demos
View webinars
Find answers or ask questions
Docs & demos for Angular
Docs & demos for React
Docs & demos for Vue
Our state of the art Gantt chart
Post by beotech » Tue Feb 23, 2021 3:18 pm
Hello, We would like to sort the columns by their text property in alphabetic order in the column picker but keep the defined order in the grid (without have a submenu in the column picker like in groupByTag). Is this possible?
Thanks in advance
Post by mats » Tue Feb 23, 2021 8:21 pm
Something like this should do it:
features: { headerMenu: { processItems({ items }) { const menuItems = items.columnPicker.menu.items; menuItems.sort((a, b) => a.text < b.text ? -1 : 1); } } },