1rosehip / jplist

jPList jQuery Data Grid Controls is a flexible jQuery plugin for sorting, pagination and filtering of any HTML structure (DIVs, UL/LI, tables, etc).
http://jplist.com
Other
436 stars 177 forks source link

$('#search').jplist({ command: 'empty' }); doesn't clear the pagination status #256

Open mistyn8 opened 7 years ago

mistyn8 commented 7 years ago

if we fill the results with $('#search').jplist({ command: 'add', commandData: { $items: $('#search-result-list') } }); and then view page 2, via bootsrtap pagination control then empty with $('#search').jplist({ command: 'empty' });

if we then refill with a different result again using $('#search').jplist({ command: 'add', commandData: { $items: $('#search-result-list') } });

we end up on page 2.. when should really be page 1?

mistyn8 commented 7 years ago

noticed that it behaves like this for any change of state in pagination/filter/toggle/keyword etc..

data-jump-to-start="true"

seems to resolve for the control state changes, haven't had chance to check the empty funct.