-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
calculateDimensionsIndexRange() {
let startIndex = 0;
const rangeMap: {
[key: string]: number;
} = {};
this._dimensionsIndexRange = this.indexKeys.reduce((acc, key) => {
const dimensions = this.getDimension(key);
const recyclerType = dimensions.recyclerType;
if (rangeMap[recyclerType] === undefined) rangeMap[recyclerType] = 0;
const endIndex = startIndex + dimensions.length;
const startIndexInRecycler = rangeMap[recyclerType];
rangeMap[recyclerType] = startIndexInRecycler + dimensions.length;
acc.push({
startIndex,
endIndex,
dimensions,
startIndexInRecycler,
enIndexInRecycler: rangeMap[recyclerType],
});
startIndex = endIndex;
return acc;
}, []);
}
onItemsCountChanged(useCache = false) {
this.reflowFlattenData();
this.calculateDimensionsIndexRange();
this.calculateReflowItemsLength();
this.updateChildDimensionsOffsetInContainer();
this.updateScrollMetrics(this._scrollMetrics, { useCache });
}Basically, calculateDimensionsIndexRange is triggered onItemsCountChanged, It will be about 50ms delay comparing with registerList / registerItem.
Now this issue will cause itemMeta.getIndexInfo() return with null
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels