Reset page offset when filtering by facets

pull/18/head wp-1.6.2
Frode Petterson 2016-04-12 15:01:10 +02:00
parent 7474916f3a
commit b93b7082dc
1 changed files with 4 additions and 0 deletions

View File

@ -255,6 +255,7 @@ var H5PDataView = (function ($) {
var remove = function () {
self.facets[col].$tag.remove();
delete self.facets[col];
self.offset = 0; // Reset to page 1
self.loadData();
};
@ -275,6 +276,9 @@ var H5PDataView = (function ($) {
}
});
// Reset to page 1
self.offset = 0;
// Load data with new filter
self.loadData();
};