ember-collection icon indicating copy to clipboard operation
ember-collection copied to clipboard

index not updated properly

Open ghedamat opened this issue 8 years ago • 3 comments

Hi!

I'm in the process of updating what @cibernox did here https://github.com/cibernox/ember-power-select-collection

In its newest version ember-power-select relies on the index yielded property of the #each helper.

It appears that this is not playing super well with ember-collection and when power-select filters the list the indexes are not updated properly.

ember-collection exposes an index but maybe I'm simply misunderstanding its functionality?

I'll try to create a reproduction repository as soon as I can, in the meantime here's a video from this happening in my company's app

https://gsnaps.s3.amazonaws.com/screencast_2016-05-01_18-02-50.mp4

I'm rendering only the indexes in the list instead of the full content and you can see they're not contiguous

thanks!

ghedamat avatar May 01 '16 22:05 ghedamat

also to be noted, I have a workaround for ember-power-select that doesn't rely on the index property but I still wonder if index is correct

ghedamat avatar May 01 '16 23:05 ghedamat

Related: https://github.com/emberjs/ember-collection/pull/110

Sorry, just haven't had time to figure out why those tests are failing, but basically when reusing cells we aren't updating the index that gets exposed.

raytiley avatar May 02 '16 10:05 raytiley

@raytiley no problem, I missed that #110 was the same.

As mentioned I have a workaround for now anyway.

Thanks for the quick response!

ghedamat avatar May 02 '16 14:05 ghedamat