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

Ember.Select how to define the default selected value? #435

Closed
Princa opened this issue Jan 25, 2012 · 2 comments
Closed

Ember.Select how to define the default selected value? #435

Princa opened this issue Jan 25, 2012 · 2 comments

Comments

@Princa
Copy link

Princa commented Jan 25, 2012

while we use Ember.Select, how could we define the default selected value when we populate the view,
here is some code:

    {{view Ember.Select 
        contentBinding = "ET.appYearController.content" 
        selectionBinding="ET.selectedAppYearController.appYear"
        optionLabelPath="content.text"
        optionValuePath="content.value"
    }}

Do I setup any property contentBinding object?

@ebryn
Copy link
Member

ebryn commented Jan 25, 2012

Whatever the value of the selectionBinding is will be the default value. You can also add a prompt, for example:

{{view Ember.Select prompt="Please choose a year:" contentBinding="..."}}

@ebryn ebryn closed this as completed Jan 25, 2012
@Princa
Copy link
Author

Princa commented Jan 25, 2012

Hi Ebryn, here is an example to show my questions, I put the question marks after the comments, so that you could see what is happening... http://jsfiddle.net/Princa/4TZ7h/14/ thanks!!

cibernox added a commit to cibernox/ember.js that referenced this issue Apr 2, 2019
cibernox added a commit to cibernox/ember.js that referenced this issue Apr 2, 2019
cibernox added a commit to cibernox/ember.js that referenced this issue Apr 2, 2019
cibernox added a commit to cibernox/ember.js that referenced this issue Apr 2, 2019
cibernox added a commit to cibernox/ember.js that referenced this issue Apr 2, 2019
cibernox added a commit to cibernox/ember.js that referenced this issue Apr 2, 2019
chancancode added a commit that referenced this issue Apr 3, 2019
…ng-modifiers

[RFC #435] Add feature flag and tests for forwarding modifiers with splattributes
sandstrom pushed a commit to sandstrom/ember.js that referenced this issue Jun 17, 2021
add 3.13 to mouse events deprecation
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

No branches or pull requests

2 participants