Reputation: 2576
I have a table that gets populated with data based on a knockout model. I want to be able to use jQuery mobile's new column toggle feature but it's not working properly with rows populated from a knockout model.
Not sure how I can get this to work if someone could enlighten me that would be great.
Here is a jsfiddle of the issue, if you comment out the
ko.applyBindings(viewModel);
the table should work as expected, but apply the bindings and the column rows never disappear.
Upvotes: 0
Views: 708
Reputation: 2576
Until a patch comes out from jQM I resorted to doing this:
$('.holder table')
.attr('data-mode', 'columntoggle')
.attr('data-role', 'table')
.table();
which works really well for me as my data is just loaded in via ajax and is never changed.
Upvotes: 3
Reputation: 14677
It appears that this is not a problem specific to knockout, but with the toggle-column table widget itself: https://forum.jquery.com/topic/jqm-1-3-0-dynamic-column-toggle-table
Upvotes: 0