1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add scrollOnAdd option to editableList

This commit is contained in:
Nick O'Leary 2016-09-29 23:44:49 +01:00
parent 15e828e975
commit 84457bc7b4

View File

@ -87,7 +87,10 @@
this.activeFilter = this.options.filter||null;
this.activeSort = this.options.sort||null;
this.scrollOnAdd = this.options.scrollOnAdd;
if (this.scrollOnAdd === undefined) {
this.scrollOnAdd = true;
}
var minHeight = this.element.css("minHeight");
if (minHeight !== '0px') {
this.uiContainer.css("minHeight",minHeight);
@ -255,7 +258,7 @@
}
}
if (!that.activeSort) {
if (!that.activeSort && that.scrollOnAdd) {
setTimeout(function() {
that.uiContainer.scrollTop(that.element.height());
},0);