Table: toggle changed self.update() fixes #5839 - toggle breaks table priority hiding #5932

Closed
wants to merge 6 commits into
from

Projects

None yet

2 participants

@frequent

This should fix #5839 - columns stay hidden when shrinking and resizing the browser window.

With the fix, showing and hiding of columns is purely done based on priority-CSS. Only when the user manually toggles a column it's jqmData(cells) which now also includes the header cell itself will be locked to show()/hide().

With the fix, there is also no more need for ui-table-cell-hidden and ui-table-cell-visible.

Hope this is the correct branch...

Sample page with fix

@frequent
frequent commented May 3, 2013

@uGoMobi

Sorry, was busy all week and I know why I did not set back hidden/visible - sure kept me busy.... I think it should be fixed now.

Short comments:

  • in table.columntoggle.js checking for o.mode === "columntoggle" will always pass when no mode is set on the table, because it's then being set by the prototype.options.mode = "columntoggle". In Unit tests, this made the first table without anything set also pass into columntoggle and getting a ui-popup-container
  • in table.columntoggle.js, the change-listener on the popup bubbles. I think this is why my test failed, because bubbling with setting a class just resets the class, but when alternating setAttribute/removeAttribute, the bubble will remove attributes which just had been set.
  • in tests table-core.js 10. The dialog should become visible when button is clicked, the headers selector also selected cells from tbody. Plus selecting the first input on ui-popup-container resulted in multiple inputs being in the selector, because the plain test-table also having columntoggle set and getting a popover.

I'm not totally sold on attributes vs. adding/removing classes to lock/unlock, but for now I hope it's ok (also jsperf)

@arschmitz
Member

closing this because i dont think we will be doing another 1.3.x release

@arschmitz arschmitz closed this Aug 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment