Skip to content

Instantly share code, notes, and snippets.

@svetlio
Created March 13, 2018 15:21
Show Gist options
  • Save svetlio/e11cd0e5af8dd305feae44ea7103ecb9 to your computer and use it in GitHub Desktop.
Save svetlio/e11cd0e5af8dd305feae44ea7103ecb9 to your computer and use it in GitHub Desktop.
ngx-datatable html select update value
/**
* Update select list (html select)
*/
updateValueList(event, cell, rowIndex, row) {
var data = {
//"nid": [{"value": row.nid}],
"type":[{"target_id":"request_material"}],
"field_req_material_state": [{"value": event.target.value}]
};
this._rest.patchResource(`/node/${row.nid}`, data).subscribe(res => {
this.rows[rowIndex][cell] = event.target.value;
this.rows = [...this.rows];
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment