-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate items are shown in container #142
Comments
Same here, unfortunately. |
Hi did you find a solution for this? |
My 2 cents: this IS a bug that needs to be fixed.
And this turned out as 6 items shown in the carousel. So it seems like the problem is when we reassign items before they become visible, maybe it's a Change Detection problem. In my case I could solve it in 2 ways: assigning the items just once, or using an |
Thanks alot for your answer definitely is when the items are updated, in my case I update the elements of the carousel array and this happens, thanks for the work around i will try it. |
Ok I think we found a solution, we just remove the changeDetection: ChangeDetectionStrategy.OnPush line. And the carousel won't duplicate the items. It was just that. |
I arrived to the same conclusion to otnielgomez above. Before, i attempted to generate a trackBy function, that required me to add item.dataIndex, and item.data, since internally is hardcoded, and yet would not add, delete, change the items properly.
I needed to investigate further, but can not at this time,... i tracked the possible error to this,
Reference links to continue research: |
@zgabievi @david-blueorange @otnielgomez can you help me with repro, I can't able to reproduce it |
There are 4 items in dateSource:
But this is what I'm getting in ui:
UI is rendering 8 items.
If you create dataSource with 4 items, and in setTimeout you override dataSource with the same items, you will get this duplication reproduced.
The text was updated successfully, but these errors were encountered: