Reset current page when applying filter.
This commit is contained in:
parent
42b9eb979a
commit
8912330d29
@ -164,7 +164,7 @@ export class SamplesComponent implements OnInit {
|
|||||||
f();
|
f();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// set toPage to null to reload first page, queues calls
|
// set toPage to null to reload first page, queues calls
|
||||||
loadSamples(options: LoadSamplesOptions = {}, event = null) {
|
loadSamples(options: LoadSamplesOptions = {}, event = null) {
|
||||||
if (event) { // adjust active keys
|
if (event) { // adjust active keys
|
||||||
@ -179,6 +179,9 @@ export class SamplesComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
this.updateActiveKeys();
|
this.updateActiveKeys();
|
||||||
}
|
}
|
||||||
|
if(options.firstPage){
|
||||||
|
this.storage.set('currentPage', 1);
|
||||||
|
}
|
||||||
this.loadSamplesQueue.push(options);
|
this.loadSamplesQueue.push(options);
|
||||||
if (this.loadSamplesQueue.length <= 1) { // nothing queued up
|
if (this.loadSamplesQueue.length <= 1) { // nothing queued up
|
||||||
this.sampleLoader(this.loadSamplesQueue[0]);
|
this.sampleLoader(this.loadSamplesQueue[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user