Reset notes to display length on tag change

This commit is contained in:
Mo Bitar
2017-11-13 23:43:34 -06:00
parent 0df6c2a412
commit 9db343a634
2 changed files with 13 additions and 3 deletions

View File

@@ -49,9 +49,11 @@ angular.module('app.frontend')
this.selectFirstNote(false);
}.bind(this))
this.notesToDisplay = 20;
this.DefaultNotesToDisplayValue = 20;
this.notesToDisplay = this.DefaultNotesToDisplayValue;
this.paginate = function() {
this.notesToDisplay += 20
this.notesToDisplay += this.DefaultNotesToDisplayValue
}
this.optionsSubtitle = function() {
@@ -77,6 +79,14 @@ angular.module('app.frontend')
}
this.tagDidChange = function(tag, oldTag) {
var scrollable = document.getElementById("notes-scrollable");
if(scrollable) {
scrollable.scrollTop = 0;
scrollable.scrollLeft = 0;
}
this.notesToDisplay = this.DefaultNotesToDisplayValue;
this.showMenu = false;
if(this.selectedNote && this.selectedNote.dummy) {