Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4831

Something is wrong with best practice rules

$
0
0

@ioanszabo wrote:

lines: Ember.computed('linesReady', 'selectedID', function () {
		let selectedID= this.get('selectedID')
		let lines= this.get('linesReady')

		return lines.map(line => {
			if (line.options.entityID === selectedID) {
				Ember.set(line, 'isSelected', true)
			} else {
				Ember.set(line, 'isSelected', false)
			}
			if (!line.special) {
				line.options.weight = lienWeight
			}
			return line
		})
	})

As you can see, I have to use Ember.set in order to avoid ‘You must use Ember.set blah blah

If I use Ember.set I get 'Do not send events or actions in Computed Properties. This will cause data flow issues in the application, where the accessing…

So? What is wrong?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4831

Trending Articles