Skip to content

Commit

Permalink
When a prompt is passed into the component we need to set the placeho…
Browse files Browse the repository at this point in the history
…lder text so that clearing/restoring defaults will work properly with semantic-ui
  • Loading branch information
nathanpalmer committed Jun 24, 2015
1 parent b4a8867 commit 3390080
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions addon/components/ui-dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ export default Ember.Select.extend(Base, DataAttributes, {
if (typeof value !== "undefined" && value !== null) {
this.execute('set selected', value);
}

var placeholder = this.get('prompt');
if (typeof placeholder !== "undefined" && placeholder !== null) {
this.$().data('placeholderText', placeholder);
}
}),

onChange: function(value, text, $element) {
Expand Down

0 comments on commit 3390080

Please sign in to comment.