I have bootstrap table. In first col I have checkbox styled with Switchery plugin. I'm not able to reinitialize switchery checkbox after table sort event. I found this event:
$(function () {
$('[data-toggle="table"]').bootstrapTable({
onSort: function (name, order) {
var elems = Array.prototype.slice.call(document.querySelectorAll('.demo-switch'));
elems.forEach(function (html) {
var switchery = new Switchery(html);
});
}
});
});
But it looks like the event is called before sort is done... Search event, page event works but sort no. Can anybody help me?
Other question is how can I reinitialize Switchery instances, because everytime I call new ones :)