ember-cli-validation-components
Advanced tools
@@ -18,2 +18,3 @@ import Ember from "ember"; | ||
| defaultChoice: Ember.computed(function() { | ||
| if (this.get('placeholder')) { return; } | ||
| return this.get("fieldObj").choices[0]; | ||
@@ -23,2 +24,3 @@ }), | ||
| remainingChoices: Ember.computed(function() { | ||
| if (this.get('placeholder')) { return Ember.A(this.get("fieldObj").choices); } | ||
| return Ember.A(this.get("fieldObj").choices.slice(1, 100)); | ||
@@ -25,0 +27,0 @@ }), |
@@ -7,4 +7,8 @@ {{#if before}} | ||
| <select id="{{_id}}"> | ||
| <option value="{{defaultChoice}}" selected="selected">{{defaultChoice}}</option> | ||
| <select id="{{_id}}" class="{{_class}}"> | ||
| {{#if placeholder}} | ||
| <option id="validated-select-placeholder" disabled selected>{{placeholder}}</option> | ||
| {{else}} | ||
| <option value="{{defaultChoice}}" selected="selected">{{defaultChoice}}</option> | ||
| {{/if}} | ||
| {{#each remainingChoices as |choice|}} | ||
@@ -11,0 +15,0 @@ <option value="{{choice}}">{{choice}}</option> |
+1
-1
| { | ||
| "name": "ember-cli-validation-components", | ||
| "version": "0.3.2", | ||
| "version": "0.4.0", | ||
| "description": "Easy to use input components to manage all your form validation needs", | ||
@@ -5,0 +5,0 @@ "directories": { |
14318
2%206
0.98%