Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8297761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:31:54+00:00 2026-06-08T15:31:54+00:00

I have added selectionDidChange event for my Ember.Select, but when my view loads it

  • 0

I have added selectionDidChange event for my Ember.Select, but when my view loads it fires the event for all the available dropdown options while loading. The reason being it is internally adding options to dropdowns & keeps firing the selectionDidChange event….Is there any way so that I can stop the initial event firing

Here’s my code(test code)

App = Em.Application.create();
App.myView = Em.View.extend({
  templateName: 'myTemplate',
  myArr:[{category:"spend"},{category:"cashflow"}],
  selectedItem: '',
  dropDownView: Ember.Select.extend({
     contentBinding: 'parentView.myArr',
     selectionBinding: 'parentView.selectedItem',
     optionLabelPath: 'content.category'
     selectionDidChange: function(){
       alert("yes it changed");
     }
  })
}); 

My corresponding Handlebar(myTemplate.handlebars) file
{{view.dropDownView}}

Now, when I load this view it alerts even before I select any option in the drop down…

Extra Info:I need this function as I am working on developing widget using RaphaelJS, so as I change the dropdown options I want the Widget to change.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T15:31:56+00:00Added an answer on June 8, 2026 at 3:31 pm

    Add the selectionDidChange function in didInsertElement:

    dropDownView: Ember.Select.extend({
        didInsertElement: function(){
            this.set('selectionDidChange', function(){
                alert("yes it changed");
            });
        },
        contentBinding: 'parentView.myArr',
        selectionBinding: 'parentView.selectedItem',
        optionLabelPath: 'content.category'
    })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have added a dropdown dynamic in codeigniter echo form_dropdown('mydrop',$options); The options are called
I have added WindowLoaded event as a routed event handler in constructor but not
I have added a checker to ensure that all fields in a form have
I have added the sdk files like dropbox website says, but I can't figure
I have added a few buttons to self.view. When the user clicks on one
I have added some testers to my Facebook application while it is still in
I have added a custom view to my subclass of NSMenuItem (which sits in
I have added a UIButton in a table view. Now when I click a
I have added the required assemblies and registered the NVelocityViewFactory in global.asax.cs page but
I have added an event listener for a particular event, for e.g. CollectionEvent.COLLECTION_CHANGE. Inside

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.