intel / appframeworkPlugins

Plugins for jqMobi
17 stars 23 forks source link

jq filterlist plugin refresh problem #3

Closed ghost closed 8 years ago

ghost commented 11 years ago

When i try to refresh my list with the $("#myCoolListContainer").filterList("refresh"); function i break the filterplugin (but without an js error or similar, it just dont work [wont filter text in lists anymore, just like a plain & empty edit field])!

As i tryed to reproduced i ran into a slightly different error but i think its connected. I used the filterlist example which is delivered along with the plugin in the index.html. I just added the newest jq.mobi.min.js from github and a link which triggers the refresh.

<html>
<link rel="stylesheet" type="text/css" href="jq.filterlist.css">

<script src="jq.mobi.min.js"></script>
<script src="jq.filterlist.js"></script>
<script>
$(document).ready(function(){
$("#list").filterList({revealElements:false,perPage:3,caseInsensitive:true});
});
</script>
  <body>
    <div style='width:200px;border:1px solid black;'>
      <ul id='list'>
      <li><a href="#foo" data-filter="foo">One - data-filter="foo"</a></li>
      <li><a href="#foo">Two</a></li>
      <li><a href="#foo">Three</a></li>
      <li><a href="#foo">Four</a></li>
      <li><a href="#foo">Five</a></li>
      <li><a href="#foo" data-ignore="true">Six (we ignore this one)</a></li>
      <li>Seven</li>
     </ul>
   </div>
   <a href="javascript:$('#list').filterList('refresh');">Refresh</a>
  </body>

</html>

The plugin will work fine as long as you dont push that button (tested in google chrome). As soon as you press it, strange things happen when you search something or delete when you delete the search string (manual or with that little cross). The pagecounter will not count correctly, white pages are inserted, sometimes searching after existent nodes wont bring up the node.