jeudi 7 juillet 2016

Ember table do not geting updating after saving or any other operation

I am using a simple table for ember when same any record it got saved in database.

but there is no effect on table i have to click of sort icon see to changes.

saveempRcd: function (empRcd) {

        if(this.isValidRecord(empRcd, empRcd.get('employee'))){
            this.controller.set('loader', true);
            empRcd.save().then(() => {
                this.store.unloadAll();
                return this.store.findRecord('employee-list', 1).then((response) => {
                    this.get('notify').success("Successfully saved");
                    return this.controllerFor('employee').set('cEmpData', response);
                });
            }).catch((exception) => {
                this.get('notify').alert({
                    html: this.get('errorFormatter').formatErrorNotification(exception),
                    closeAfter: null
                });
            }).finally(() => {
                this.controller.set('loader', false);
                this.transitionTo("employee");
            });
        } else {
            this.controller.set('errorMessage', empRcd.get('validations.messages'));
        }
    },




Aucun commentaire:

Enregistrer un commentaire