mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Scroll to bottom when item added to editableList
This commit is contained in:
parent
d3be1f1e2c
commit
5f047633c3
@ -82,6 +82,14 @@
|
|||||||
this.uiHeight = this.options.height;
|
this.uiHeight = this.options.height;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.element.height('auto');
|
||||||
|
|
||||||
|
var attrStyle = this.element.attr('style');
|
||||||
|
var m;
|
||||||
|
if ((m = /width\s*:\s*(\d+%)/i.exec(attrStyle)) !== null) {
|
||||||
|
this.element.width('100%');
|
||||||
|
this.uiContainer.width(m[1]);
|
||||||
|
}
|
||||||
if (this.options.sortable) {
|
if (this.options.sortable) {
|
||||||
var handle = (typeof this.options.sortable === 'string')?
|
var handle = (typeof this.options.sortable === 'string')?
|
||||||
this.options.sortable :
|
this.options.sortable :
|
||||||
@ -169,6 +177,9 @@
|
|||||||
var index = that.element.children().length-1;
|
var index = that.element.children().length-1;
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
that.options.addItem(row,index,data);
|
that.options.addItem(row,index,data);
|
||||||
|
setTimeout(function() {
|
||||||
|
that.uiContainer.scrollTop(that.element.height());
|
||||||
|
},0);
|
||||||
},0);
|
},0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user