swimlane / ngx-datatable

✨ A feature-rich yet lightweight data-table crafted for Angular
http://swimlane.github.io/ngx-datatable/
MIT License
4.63k stars 1.68k forks source link

ngx-datatable column toggling issue #1581

Open chinniah-a opened 6 years ago

chinniah-a commented 6 years ago

I tried the demo for toggling columns in the following site http://swimlane.github.io/ngx-datatable/#toggle

When none of the columns are checked, instead of showing "No Data", shows the last available column.

Image Link image_2

joeveiga commented 3 years ago

Thanks @chinniah-a. This check seems to be the one causing the reported behavior.

https://github.com/swimlane/ngx-datatable/blob/be41f9fe6438b772a3770c8f6350c1d7b2a48a83/projects/swimlane/ngx-datatable/src/lib/components/datatable.component.ts#L730

However, I don't see many scenarios where a datatable without columns can be useful.