Skip to content
This repository has been archived by the owner on Apr 2, 2019. It is now read-only.

SelectRowCell event contamination #131

Closed
eggbeard opened this issue Apr 15, 2013 · 3 comments
Closed

SelectRowCell event contamination #131

eggbeard opened this issue Apr 15, 2013 · 3 comments
Labels
Milestone

Comments

@eggbeard
Copy link

In a solution where multiple grids are present, each with their own filter controll and all containing a SelectRow there is event contamination across the different grids.

So if I filter grid A, which correctly causes a collection reset a requires a re-render of the grid, which the SelectRow is listening to from

this.listenTo(Backbone, "backgrid:refresh", function () {

unfortunately this results in ALL select rows on all grids responding to the refresh of any grid on the page. This is very wasteful and quite confusing if you have things listening to your backgrid:selected events.

Beyond my understanding to suggest what to do about it I'm afraid, but it must be possible to only listen to the grid/collection of interest

@wyuenho
Copy link
Contributor

wyuenho commented Apr 15, 2013

Yep you are right, and you can actually see I've started cleaning up these loud event broadcasts on master for more than a week now. This is a prevalent problem in Backgrid <= 0.2.0 as the events are still in flux. Starting with 0.2.1, all the cross-view events will be triggered from the model/collection only and nowhere else, so you'll only get the events if you are sharing the same collection in multiple grids.

@wyuenho
Copy link
Contributor

wyuenho commented Apr 15, 2013

Take a look at #117 too if you are interested in helping out.

@eggbeard
Copy link
Author

Excellent. Hadn't occured to me to look in master.... sorry. Still a git newbie :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants