{"action":"closed","issue":{"url":"https://api.github.com/repos/knockout/knockout/issues/1791","labels_url":"https://api.github.com/repos/knockout/knockout/issues/1791/labels{/name}","comments_url":"https://api.github.com/repos/knockout/knockout/issues/1791/comments","events_url":"https://api.github.com/repos/knockout/knockout/issues/1791/events","html_url":"https://github.com/knockout/knockout/issues/1791","id":76020223,"number":1791,"title":"TableSorter wit kncokout and computed ArrayObservable","user":{"login":"biocar2001","id":4458621,"avatar_url":"https://avatars.githubusercontent.com/u/4458621?v=3","gravatar_id":"","url":"https://api.github.com/users/biocar2001","html_url":"https://github.com/biocar2001","followers_url":"https://api.github.com/users/biocar2001/followers","following_url":"https://api.github.com/users/biocar2001/following{/other_user}","gists_url":"https://api.github.com/users/biocar2001/gists{/gist_id}","starred_url":"https://api.github.com/users/biocar2001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biocar2001/subscriptions","organizations_url":"https://api.github.com/users/biocar2001/orgs","repos_url":"https://api.github.com/users/biocar2001/repos","events_url":"https://api.github.com/users/biocar2001/events{/privacy}","received_events_url":"https://api.github.com/users/biocar2001/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-13T15:13:16Z","updated_at":"2015-05-13T15:49:09Z","closed_at":"2015-05-13T15:49:09Z","body":"Hi,\r\n\r\nWe have a table which one show the users with the help of jquery plugin table. When We are using this control with knockout and we iterate the table with a observable Array everything is fine with the help of a handler developed for us:\r\n\r\n```javascript\r\nko.bindingHandlers.sortTable = {\r\n        init: function(element, valueAccessor) {\r\n            var iden=$(element).attr(\"id\");\r\n            setTimeout( function() {\r\n                if($(element).hasClass('tablesorter')){\r\n                    ko.utils.unwrapObservable(valueAccessor())\r\n                    $(element).trigger('updateAll');\r\n                }else{\r\n                    $(element).tablesorter({\r\n                        widgetOptions:{filter_external : '#'+iden+\"_search\"}\r\n                        //headers: {0: {sorter: false}}\r\n                    }).tablesorterPager({container: $('#'+iden+\"_pager\")});\r\n                }\r\n            }, 0);\r\n        },\r\n\t\tupdate: function(element, valueAccessor) {\r\n\t       $(element).trigger(\"update\");\r\n        }\r\n    };\r\n\r\n```\r\nand in the template we do binding in this way:\r\n\r\n```html\r\n<tbody data-bind=\"foreach: MyListObservable\">\r\n```\r\n\r\nThe problem happen when our MyListObservable is a computed value, which one is recalculated in function of other check observable. In this case the behaviour of the control is strange and always add elements to the table but when the observable array remove information this one dont update the index of the table and theirs values. I have tried without success:\r\n\r\n1º RemoveAll the values of the array before reload the array.\r\n2º Force the updateAll the table just after of reload of computed value $(element).trigger('updateAll').\r\n3º Get the value of the computed and assign his value to other observable array and iterate with this new array.\r\n\r\nI know here is the repository of knockout and not of tableSorter.jquery but obviously the problem has relation with knockout and maybe other users had the same problem.\r\nAny idea?\r\nThanks in advance."}}