-
-
Notifications
You must be signed in to change notification settings - Fork 333
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
Danchadwick wip buff up #334
Changes from all commits
76819ca
537fd37
73339d8
2f3081f
31751b6
cf324a3
6f3a8d2
d7d7b8d
ffc798b
1cff0a2
af7f7b4
9b2c505
f7b2d71
f115f4c
b955ecd
6ed3953
45ad541
6fa05b9
430a989
f223852
fe14328
5f854e6
829f666
f48230b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,9 +19,9 @@ export default Ember.Component.extend(RippleMixin, ProxyMixin, { | |
|
||
hasProxiedComponent: Ember.computed.bool('proxiedComponents.length'), | ||
|
||
hasSecondaryAction: Ember.computed('secondaryItem', 'action', function() { | ||
hasSecondaryAction: Ember.computed('secondaryItem', 'onClick', function() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not destructure computed from Ember, just like in paper-input.js There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @xomaczar - Absolutely. The purpose of this PR was to make some API changes. The affected file has not been gone thru and adjusted to conform to the ember-paper style guides (in contributing.md). I only touch paper-item to get rid of all the "action" properties. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @DanChadwick makes sense |
||
let secondaryItem = this.get('secondaryItem'); | ||
return secondaryItem && (secondaryItem.action || (this.get('action') && this.isProxiedComponent(secondaryItem))); | ||
return secondaryItem && (secondaryItem.action || (this.get('onClick') && this.isProxiedComponent(secondaryItem))); | ||
}), | ||
|
||
secondaryItem: Ember.computed('proxiedComponents.[]', function() { | ||
|
@@ -31,8 +31,8 @@ export default Ember.Component.extend(RippleMixin, ProxyMixin, { | |
}); | ||
}), | ||
|
||
shouldBeClickable: Ember.computed('proxiedComponents.length', 'action', function() { | ||
return this.get('proxiedComponents.length') || this.get('action'); | ||
shouldBeClickable: Ember.computed('proxiedComponents.length', 'onClick', function() { | ||
return this.get('proxiedComponents.length') || this.get('onClick'); | ||
}), | ||
|
||
didInsertElement() { | ||
|
@@ -51,7 +51,7 @@ export default Ember.Component.extend(RippleMixin, ProxyMixin, { | |
|
||
// Allow proxied component to propagate ripple hammer event | ||
this.get('proxiedComponents').forEach(function(component) { | ||
if (!component.get('action')) { | ||
if (!component.get('onClick')) { | ||
component.set('propagateRipple', true); | ||
} | ||
}); | ||
|
@@ -107,7 +107,7 @@ export default Ember.Component.extend(RippleMixin, ProxyMixin, { | |
component.processProxy(); | ||
} | ||
}); | ||
this.sendAction('action', this.get('param')); | ||
this.sendAction('onClick'); | ||
} | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import Ember from 'ember'; | ||
import PaperInput from './paper-input'; | ||
|
||
let { computed } = Ember; | ||
|
||
export default PaperInput.extend({ | ||
label: Ember.computed.alias('placeholder'), | ||
value: Ember.computed.alias('model'), | ||
itemLabelCallback: Ember.computed.alias('item-label-callback'), | ||
onOpen: Ember.computed.alias('on-open') | ||
label: computed.alias('placeholder') | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be
onChange
, right?