sukima / ember-cli-select-picker

An enhanced Boostrap styled select component addon for Ember CLI
https://sukima.github.io/ember-cli-select-picker
MIT License
23 stars 15 forks source link

Default selection #50

Open aklkv opened 8 years ago

aklkv commented 8 years ago

Hi! I was wondering, is there any way to specify default selection?

sukima commented 8 years ago

I believe this might work:

<select-picker content={{mySelectContent}}
               selection={{myDefaultChoice}}
               action=(action "userPickedSomething")>

Then just preset the myDefaultChoice. Though I haven't tested this. It was a thought.

williamweckl commented 8 years ago

Could I remove the nothing selected option and make always the first selected by default?

sukima commented 8 years ago

The current logic has a lot of assumptions. The ability to customize it was an afterthought. This entire component needs to be refactored. Eventually I think it would be supported.

In the mean time the ember-power-select addon has a bootstrap theme and is far more customizable then mine.

williamweckl commented 8 years ago

Thank you for the tip! Anyway, congratulations for the work done, so far I don't need to use another one.