in public/src/js/widgets/autocomplete.js [104:125]
nextPage() {
var state = this.state();
state.page = this.currentPage() + 1;
this.paginationInProgress(true);
autocomplete(state).then(res => {
if (res && res.results && res.results.length) {
this.currentPage(res.currentPage || 1);
this.totalPages(res.pages || 1);
this.suggestions(this.suggestions().concat(res.results));
} else {
this.alertMessage('...sorry, no ' + this.getPath() + ' found.');
}
})
.catch(ex => {
this.alertMessage(ex.message);
})
.then(() => {
this.paginationInProgress(false);
this.emit('update');
});
}