you should provide some code so we can see where the problem is. Copy here some code of your .html and (.ts or .js) files. Without any code it’s pretty hard to help.
Trying to remove an item from the list with the swipe event
this.items.splice(index, 1);
=> Virtual Scroll reset, scroll to top position. As indicated in Ionic 2 “Changing the dataset requires the entire virtual scroll to be reset, which is an expensive operation and should be avoided if possible”
I suppose I have to find another way to remove the item from the list, so i try to hide the item in the list. I add the following line to my ion-card
[hidden]=“item.hide”
=> item disappears from the list, the scroll position is retained. But the next elements does not go up in the list, there is blank space.
I seek another solution to remove or hide an item in a virtual scroll. Or there is something I’m doing wrong?
I try to do the same operation on the footer, ie remove it from the list When RemoveCard_Footer is called.
I added [ngClass]="{‘hideIonCard’: Footer_Show == false}" on the footer. But this time, I do not have the same behavior
=> item disappears from the list, the scroll position is retained. But the next elements does not go up in the list, there is blank space.
Please open an issue on Github about this exact issue. You’re not the only one having the problem. No matter the changes you do to the original object, VirtualScroll will always recalulate itself and force to init position.