Skip to content
This repository

Table breaks on data reload (AJAX) when in responsive mode. #32

Open
chrisdpratt opened this Issue February 20, 2013 · 1 comment

2 participants

chrisdpratt steveush
chrisdpratt

This is sort of an edge case, but it's also kind of a common pattern. An AJAX request gets fired off which "refreshes" the table, by replacing its rows. This obviously means FooTable needs to run again on the table, which is fine.

The problem comes in when the table is in a "responsive" mode, for lack of a better word. Columns have actually been removed from the table in this view, so when the new table rows go in, they're off and the table is expanded past the last column.

The only way I can see to get around this to provide some method to "destroy" FooTable. In other words, undo what FooTable does to make the table responsive (should be as simple as treating it as if there is no width restraint, so all the columns come back into view). Then the new rows could be added, and one would simply just need to call .footable() on the table again.

steveush
Collaborator

Hi Chris,

This has been brought up in Issue #16 and I will be adding in better Ajax support in the near future allowing you to refresh a FooTable instance to "redraw" the columns once new rows have been added.

Thanks
Steve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.