deblockt / hal-rest-client

Typescript HAL Rest client
Apache License 2.0
25 stars 11 forks source link

HalResource's .update() marks all fields as new if list was updated. #28

Closed Zordaxy closed 5 years ago

Zordaxy commented 6 years ago

Let's get some list to show: parts: Array<Part>;

If to change parts[0].description and call parts[0].update() - only "description" field is sent to server. But if we update list: this.provider.loadParts().then(parts => this.parts = parts ); - we will get all fields marked as updated. Then on parts[0].update() all fields are sent to server.

Could you please separate HalResource certain field update from object replacement? Or some other way to keep list untouched when replace all the list.

deblockt commented 5 years ago

what do this.provider.loadParts() function?

deblockt commented 5 years ago

close due to no activity from 30 Jul 2018.