reuse collections in multiple grids
gerpres opened this issue · 3 comments
is it allowed to reuse collections in multiple grids?
because currently _StoreMixin._cleanupCollection calls _renderedCollection.tracking.remove() which causes all handles to be removed - also tracking-handles not owned by the current grid
It is desired that multiple grids can use the same collection and yes, that remove call is a problem. The handles are not owned by the grid but by the dstore/Trackable mixin. They are the listeners Trackable uses to monitor the collection's activity so Trackable can enhance those events with position information.
I'm not sure if this is a problem that can be easily fixed. It is going to take some thought. I would say for now, create multiple trackable collections if you can.
I wonder... Do those handles really need to be destroyed? Can't they live the entire life of the Trackable object?
I removed the code that removes the handles held by the collection.