After an update API action, I am using Model.set({ modelJson: attributes }) as follows.
update(attributes = {}) {
API.requestHeaders[HEADER_SESSION_TOKEN] = authProvider.fetchToken();
return API.request({
method: "put",
data: { resource: [attributes] },
endpoint: this.urlRoot,
onSuccess: (response) => {
console.log(this.detail);
this.set({ modelJson: attributes });
console.log(this.detail);
}
});
}
This is wiping out all the other properties.
In attributes, I passed in "id" and "name". The console.log before and after the set is shown below.

After an update API action, I am using
Model.set({ modelJson: attributes })as follows.This is wiping out all the other properties.
In attributes, I passed in "id" and "name". The console.log before and after the set is shown below.