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:
parent
15e828e975
commit
84457bc7b4
@ -87,7 +87,10 @@
|
|||||||
|
|
||||||
this.activeFilter = this.options.filter||null;
|
this.activeFilter = this.options.filter||null;
|
||||||
this.activeSort = this.options.sort||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");
|
var minHeight = this.element.css("minHeight");
|
||||||
if (minHeight !== '0px') {
|
if (minHeight !== '0px') {
|
||||||
this.uiContainer.css("minHeight",minHeight);
|
this.uiContainer.css("minHeight",minHeight);
|
||||||
@ -255,7 +258,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!that.activeSort) {
|
if (!that.activeSort && that.scrollOnAdd) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
that.uiContainer.scrollTop(that.element.height());
|
that.uiContainer.scrollTop(that.element.height());
|
||||||
},0);
|
},0);
|
||||||
|
Loading…
Reference in New Issue
Block a user