meteor-tabular icon indicating copy to clipboard operation
meteor-tabular copied to clipboard

Column visibility breaks on hidden columns

Open derouck opened this issue 9 years ago • 4 comments

When you have hidden columns when a table is loaded the labels will be incorrect. This can be done by having saveState and colvis enabled. Or it can occur if you hide a column by default.

derouck avatar Nov 21 '16 23:11 derouck

I don't understand. Can you add code examples or a link to reproduction of the issue?

aldeed avatar Nov 23 '16 18:11 aldeed

Ok, excuse for the very brief ticket. I should have given more information.

The problem occurs when you use titleFn function to manage table labels. And when you have hidden columns. This can be done through the dataTables buttons as explained in the tabular readme. Or it can be done by having a column disabled but that pbb doesn't make too much sense if you don't have the colvis buttons. I've updatet the GreatAlbums repo to the latest meteor and updatet tabular. Now the problem can be seen if you hide a table with the button and come back after visiting another table!

https://github.com/derouck/GreatAlbums

Let me know if I can help somehow.

derouck avatar Nov 24 '16 11:11 derouck

@derouck Are you sure this wasn't fixed in the latest release? How is it different from https://github.com/aldeed/meteor-tabular/issues/354

aldeed avatar Dec 06 '16 19:12 aldeed

Looks like this was kind of dropped, but I seem to be experiencing the same issue.

with code as :

    {
       data: "_id",
       visible: false,
       title: ""
     },
    {
      data: "name",
      titleFn: () => i18n.__('installation.table.name')
    },
    ...

I get screen shot 2018-06-03 at 12 57 44 pm

With the line commented out as such

// {
    //   data: "_id",
    //   visible: false,
    //   title: ""
    // },
    {
      data: "name",
      titleFn: () => i18n.__('installation.table.name')
    },
    ...

I get: screen shot 2018-06-03 at 12 57 20 pm

It seems with the column hidden it doubles up on the next title to compensate leaving an "empty column"..

joerou avatar Jun 03 '18 17:06 joerou