vendredi 26 octobre 2018

Ember findRecord will not update dirtyrecords in the store | Ember Data 3.5.0

Im using emberData 3.5.0 where i have change the record from the store and when my view is in edit mode. then when i press cancel, im trying to fetch the record from backend and update in the store. so in my cancel action im calling

      this.store.findRecord( 'profile', id, {reload:true}).then( response => {
        this.controllerFor( 'people/profile' ).set( 'user',response);
        this.controllerFor( 'people/edit' ).set( 'person',response );
})

but the issue is the dirty record which i was changed in edit mode will not be refreshed with this call. ( server call is going for the record).

i tried all the references in ember and forums but i couldn't find a solution for this.




Aucun commentaire:

Enregistrer un commentaire