0

So, I have this code:

{{#if isClient}}
    {{view Ember.Select
            value=country
            content=options.country
            prompt='Please select a country'}}
{{/if}}

Which works wonderfully at load because isClient defaults to true. However, when I set isCLient to false, I get this error:

Cannot read property 'selectedIndex' of undefined

Anyone with a better understanding of the underlying code have any ideas here?

story
  • 729
  • 2
  • 9
  • 22

1 Answers1

0

Ok, so I found out what the problem was.

I was using the ember-animate library and calling:

Ember.View.reopen({
    willAnimateIn: function () {
        this.$().hide();
    },
    animateIn: function (done) {
        this.$().fadeIn(250, done);
    },
    animateOut: function (done) {
        this.$().fadeOut(250, done);
    },
});

Since Ember.Select is a view, the animation features were being called when it was supposed to appear and disappear. So, I just changed the above to this:

Ember.AnimatedView = Ember.View.extend({

And all is well.

story
  • 729
  • 2
  • 9
  • 22