You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to create a component that contains a collection view ? #806
I can use ComponentKit to create a collection view whose cells display simple views. However, I get into trouble when I create a component which contains a collection view. Is there any demo or tips to do that ? Thanks a lot .
I initialize the dataSource with one section and insert multiple items. When I scroll the collection view, it works correctly. Then I scroll up and down few times, the cells which contain a collection view show content in the wrong order. When the cell will appear, I check the model that is correct. But when the cell did appear, it shows different content randomly. I think maybe there is something wrong with reusing. I worked on it for a few days but cannot find out the solution. Could you show me how to create a component that contains a collection view ?
Here is my CollectionComponent, the FixedCollectionView is a UIView with a collection view on it.
I opened #810 to track providing an example. Closing this issue since the specific issue here with the code needs more information to be actionable. If you get a failing unit test, feel free to open a new issue!
Activity
ryanrhee commentedon May 4, 2017
That should work as expected. What do you mean by "get into trouble"?
sxgfxm commentedon May 5, 2017
I initialize the dataSource with one section and insert multiple items. When I scroll the collection view, it works correctly. Then I scroll up and down few times, the cells which contain a collection view show content in the wrong order. When the cell will appear, I check the model that is correct. But when the cell did appear, it shows different content randomly. I think maybe there is something wrong with reusing. I worked on it for a few days but cannot find out the solution. Could you show me how to create a component that contains a collection view ?
Here is my CollectionComponent, the FixedCollectionView is a UIView with a collection view on it.
Thank you for your help
ryanrhee commentedon May 8, 2017
Just glancing at it, things look fine. If you think there's a bug with the core framework can you show it with a breaking unit test? Thanks!
ocrickard commentedon May 9, 2017
This seems likely an issue inside your collection view code.
cc @gkassabli @lucasr we get requests to have an open-source collection view example every once in awhile. Any interest in providing an example?
ocrickard commentedon May 9, 2017
I opened #810 to track providing an example. Closing this issue since the specific issue here with the code needs more information to be actionable. If you get a failing unit test, feel free to open a new issue!
sxgfxm commentedon May 10, 2017
Thank you for your help. I'm looking forward for the example.