diff --git a/source/Ox.UI/js/List/Ox.List.js b/source/Ox.UI/js/List/Ox.List.js index 28488010..d32e565a 100644 --- a/source/Ox.UI/js/List/Ox.List.js +++ b/source/Ox.UI/js/List/Ox.List.js @@ -1469,6 +1469,8 @@ Ox.List = function(options, self) { self.listLength = self.options.items.length; //loadItems(); updatePositions(); + emptyFirstPage(); + fillFirstPage(); } /*@ @@ -1580,6 +1582,8 @@ Ox.List = function(options, self) { self.listLength = self.options.items.length; updatePositions(); } + emptyFirstPage(); + fillFirstPage(); } /*@ scrollToSelection scroll list to current selection diff --git a/source/Ox.UI/js/List/Ox.TreeList.js b/source/Ox.UI/js/List/Ox.TreeList.js index 4514c199..f08e08af 100644 --- a/source/Ox.UI/js/List/Ox.TreeList.js +++ b/source/Ox.UI/js/List/Ox.TreeList.js @@ -43,25 +43,28 @@ Ox.TreeList = function(options, self) { }); } - that.$element = Ox.List({ - _tree: true, - construct: constructItem, - itemHeight: 16, - items: parseItems(), - itemWidth: self.options.width, - keys: ['expanded', 'id', 'items', 'level', 'title'], - max: self.options.max, - min: self.options.min, - unique: 'id' - }, Ox.copy(self)) - .addClass('OxTextList OxTreeList') - .css({ - width: self.options.width + 'px' - }) - .bindEvent({ - anyclick: clickItem, - toggle: toggleItems - }); + that.setElement( + self.$list = Ox.List({ + _tree: true, + construct: constructItem, + itemHeight: 16, + items: parseItems(), + itemWidth: self.options.width, + keys: ['expanded', 'id', 'items', 'level', 'title'], + max: self.options.max, + min: self.options.min, + unique: 'id' + }, Ox.copy(self)) + .addClass('OxTextList OxTreeList') + .css({ + width: self.options.width + 'px', + overflowY: 'scroll' + }) + .bindEvent({ + anyclick: clickItem, + toggle: toggleItems + }) + ); function clickItem(e) { var $target = $(e.target),