@localyost wrote:
Hi everybody,
I fear I already know the answer to this but I thought I’d put it out there.
I have some
DS.Models
that are displayed on one side asRowComponent
in aTableComponent
and in asMarkerComponent
in aMapComponent
on the other.When the User selects a
RowComponent
, theMarkerComponent
of the same Record should be aware of it and vice versa.I am flirting with the idea of adding
isSelected: DS.attr('boolean')
to my Models and observing it.// RowComponent click(){ // set a select styling this.get('record').set('isSelected', true); } // in MarkerComponent listenForDistantSelect: function(){ // set a select styling }.observes('record.isSelected')
It’s not really business logic, which as I understand should be reserved to Routes and EmberData stuff. Would you say this is something that should really handled at the View level or has anyone done somthing similar?
Posts: 2
Participants: 2