This looks like a bug to me. Is there a workaround?
When manually setting the isHidden property on a column the column picker button does not correctly reflect the number of columns hidden.
I followed your instruction and set up a sample of igrDatagrid with couple columns isHidden to true and when I run it I find column chooser is reflecting correct numbers.
Here is my sample I use to test it:codesandbox.io/.../recursing-hooks-4kt1f
if this is not what you are trying to do then please modify the sample and share with us for further investigation of the issue.
I was able to recreate it in your example. It seems to be related to storing the columns in state:
I am able to reproduce the issue, its indeed causing it when columns are in the state, and if you open the chooser and unselect any other column chooser will refresh somehow and start showing up number 4 for 4 hidden columns.
i logged this behavior for further investigation into our internal bug tracking system. and will link the issue with a private case CAS-212243-S7T0F8 which i created for you.
you can access private case here: <https://www.infragistics.com/my-account/support-activity>
I think I fixed this. If I put a key attribute on the IgrDataGrid component and then update the key (forcing the grid to re-render completely) every time I update the columns state it seems to work.
Glad to hear that you fixed the issue.