Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error. Where if you do shift select and click another element (so… #38

Merged
merged 7 commits into from
Jul 19, 2016

Conversation

EWhite613
Copy link
Contributor

… all others are unselected) the class is-selected does not get removed from others

patch

… all others are unselected) the class is-selected does not get removed from others
@coveralls
Copy link

coveralls commented Jul 13, 2016

Coverage Status

Changes Unknown when pulling fa66878 on EWhite613:master into * on ciena-frost:master*.

@coveralls
Copy link

coveralls commented Jul 13, 2016

Coverage Status

Changes Unknown when pulling fa66878 on EWhite613:master into * on ciena-frost:master*.

@@ -10,7 +11,10 @@ export default Ember.Component.extend({
}),

isSelected: Ember.computed.reads('model.isSelected'),

isSelectedChanged: Ember.observer('model.isSelected', function () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Urgh, trying to avoid observers - do we have another approach to this?

@coveralls
Copy link

coveralls commented Jul 14, 2016

Coverage Status

Changes Unknown when pulling 9c4835c on EWhite613:master into * on ciena-frost:master*.

isSelected: Ember.computed('model.isSelected', function () {
let modelIsSelect = this.get('model.isSelected')
modelIsSelect ? $(this.get('element')).parent().addClass('is-selected')
: $(this.get('element')).parent().removeClass('is-selected')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Computed with side effects is better, but also not ideal - do we absolutely need access to the parent in this case and is the parent not an ember component?

Might be worth a pairing session to take a look at solutions

Copy link
Contributor Author

@EWhite613 EWhite613 Jul 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to be able to bind the class to the parent. The parent is an ember component. I can extend it and do the binding similar to this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funky - give it a shot 👍

@coveralls
Copy link

coveralls commented Jul 18, 2016

Coverage Status

Changes Unknown when pulling 30fd0ca on EWhite613:master into * on ciena-frost:master*.

@coveralls
Copy link

coveralls commented Jul 18, 2016

Coverage Status

Changes Unknown when pulling 30fd0ca on EWhite613:master into * on ciena-frost:master*.

@coveralls
Copy link

coveralls commented Jul 19, 2016

Coverage Status

Changes Unknown when pulling fcc4444 on EWhite613:master into * on ciena-frost:master*.

@sglanzer-deprecated
Copy link
Contributor

sglanzer-deprecated commented Jul 19, 2016

Approved

Approved with PullApprove

@sglanzer-deprecated sglanzer-deprecated merged commit cb582df into ciena-frost:master Jul 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants