html-next / vertical-collection

Infinite Scroll and Occlusion at > 60FPS
https://html-next.github.io/vertical-collection/
MIT License
176 stars 76 forks source link

Removing items will throw an error #24

Closed srowhani closed 7 years ago

srowhani commented 7 years ago

Removing items will throw an index out of bounds assertion error.

Threw together a branch illustrating this effect

https://github.com/srowhani/vertical-collection/tree/bug/remove-items

  removeItems() {
      const items = this.get('model.numbers');
      items.splice(0, this.get('numItemsToRemove'));
      this.set('model.numbers', items.slice());
    },
pzuraq commented 7 years ago

Will be able to work on this first thing next week, I have some ideas for how it can be addressed. It's related to #26, I had removed a lot of the VC removal logic to deal with issues with Glimmer but now I think we need to add it back.