nativescript-community / ui-collectionview

Allows you to easily add a collection view (grid list view) to your projects. Supports vertical and horizontal modes, templating, and more.
Apache License 2.0
59 stars 18 forks source link

feat: shared view pools [wip] #68

Open rigor789 opened 11 months ago

rigor789 commented 11 months ago

This is a draft/wip branch of implementing shared view pools.

Shared pools will allow defining the item templates in a separate view/element, and reuse them for multiple CollectionViews. This is especially useful for nested CollectionViews, where we may have multiple CollectionViews rendering the same templates.

For simplicity, pool related logic has been moved to a new SharedCollectionViewPool class, so even if the view doesn't share the pool, it will still create one automatically and use that (rather than duplicating the logic in both classes).

todos: