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
The docs for this seem to say it will change a "selected" attribute on the model but it seems to only set a member on that instance instead of in the attributes collection via set.
On Backbone.Picky.Selectable:
select: function () {
if (this.selected) { return; }
**this.selected = true;**
this.trigger("selected");
if (this.collection) {
this.collection.select(this);
}
},
Is this intentional? I have to override my view serialization to render to pass this every time, so seems undesirable, but maybe I'm missing something?
Is this so that a change event isn't also fired or something? I guess on a fetch you would lose the selection state as well, but that could be handled.
The text was updated successfully, but these errors were encountered:
it seems that this is by design. it might also be a bit much of an assumption to make, that the model is automatically selected for anybody who loads it.
perhaps you can just subscribe to the 'select' event to set an attribute on the model, and on fetch or reset of the model, trigger the relevant select on the collection.
hashchange
added a commit
to hashchange/backbone.picky
that referenced
this issue
Jan 14, 2014
The docs for this seem to say it will change a "selected" attribute on the model but it seems to only set a member on that instance instead of in the attributes collection via
set
.On
Backbone.Picky.Selectable
:Is this intentional? I have to override my view serialization to render to pass this every time, so seems undesirable, but maybe I'm missing something?
Is this so that a change event isn't also fired or something? I guess on a fetch you would lose the selection state as well, but that could be handled.
The text was updated successfully, but these errors were encountered: