Description
Hello,
First of all thank you for helping on the last issue I had on adaptor.reload(index) on a dynamic height componenet (#344).
I'm encountering another issue, this time related to the startIndex
in settings
.
Description
The startIndex
in the settings
does bring me to the target index, but sometimes it cuts off all the items above the startIndex. Other times, it cuts off only two items above it.
Expected Behavior
The startIndex
should scroll to the target index while preserving all items in the list.
Setup
this.selectedItemsSource = new Datasource<EstimateOption>({
get: (index, count, success) => {
success(this.selectedItems.slice(index, index + count));
},
settings: {
startIndex: this.startIndex || this.DEFAULT_INDEX,
infinite: true
}
});
The EstimateOption type:
export interface EstimateOption {
id: string;
label: string;
imageId: string;
basePrice: number;
minimumQuantity: number;
description: string;
quantity: number;
lineId?: string;
}
Issue Demo
Please check this video,:
The list starts with "Banner Installation". When I initialize the scroll by clicking the last item, "Travel", it correctly brings me to that item, but everything above "First Service" is cut off.
Here is another video that shows the same issue and all the items above the target item are missing.
When initializing the scroll by clicking other items, some of them result in missing items above the clicked one.
Thank you.