Browse Source

BI-138976 fix: 在init中计算

research/test
Kobi 1 year ago
parent
commit
6f04b65783
  1. 4
      packages/fineui/src/base/list/virtualgrouplist.js

4
packages/fineui/src/base/list/virtualgrouplist.js

@ -25,6 +25,7 @@ export class VirtualGroupList extends Widget {
} }
init() { init() {
this._calculateSummaryHeight();
this.renderedIndex = -1; this.renderedIndex = -1;
} }
@ -44,7 +45,7 @@ export class VirtualGroupList extends Widget {
}, },
{ {
type: VirtualGroup.xtype, type: VirtualGroup.xtype,
height: rowHeight * items.length, height: this.summaryHeight,
ref: (ref) => { ref: (ref) => {
this.container = ref; this.container = ref;
}, },
@ -77,7 +78,6 @@ export class VirtualGroupList extends Widget {
this.populate(newValue); this.populate(newValue);
}) })
: o.items; : o.items;
this._calculateSummaryHeight();
this._populate(); this._populate();
this.ticking = false; this.ticking = false;
this.element.scroll(() => { this.element.scroll(() => {

Loading…
Cancel
Save