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.