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

Allow treeList to have a header component

This commit is contained in:
Nick O'Leary 2020-09-16 11:41:29 +01:00
parent e619b9bf7b
commit 3824cdde68
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -167,7 +167,7 @@
this._selected = new Set(); this._selected = new Set();
this._topList = $('<ol class="red-ui-treeList-list">').css({ this._topList = $('<ol class="red-ui-treeList-list">').css({
position:'absolute', position:'absolute',
top: 0, top:0,
left:0, left:0,
right:0, right:0,
bottom:0 bottom:0
@ -181,6 +181,9 @@
that._addSubtree(that._topList,container,item,0); that._addSubtree(that._topList,container,item,0);
} }
}; };
if (this.options.header) {
topListOptions.header = this.options.header;
}
if (this.options.rootSortable !== false && !!this.options.sortable) { if (this.options.rootSortable !== false && !!this.options.sortable) {
topListOptions.sortable = this.options.sortable; topListOptions.sortable = this.options.sortable;
topListOptions.connectWith = '.red-ui-treeList-sortable'; topListOptions.connectWith = '.red-ui-treeList-sortable';