ember.js - Ember select making model dirty on init -



ember.js - Ember select making model dirty on init -

having select in template makes model dirty , triggers observer on init, why? wanna able update model on alter update function triggered on init , don't wanna create api phone call on every single item on init.

template:

{{#each booking in bookings itemcontroller="booking"}} {{isdirty}} // true {{view "select" content=daterange value=booking.playingon optionvaluepath="content.date" optionlabelpath="content.day"}} {{/each}}

controller:

// running on init , when select in select drop down. updateplayingon: function(){ console.log(this.get('currentstate.statename')); // logs root.loaded.updated.uncommitted }.observes('playingon')

as have understood value=booking.playingon updates playingon model attribute same value , making model dirty.

seems ember select can't handle javascript objects, in case date object. making objects strings solves problem.

ember.js

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -