diff --git a/live/src/js/table/Cell.js b/live/src/js/table/Cell.js index 2bd6a9f7..a5c925ef 100644 --- a/live/src/js/table/Cell.js +++ b/live/src/js/table/Cell.js @@ -306,13 +306,21 @@ class Cell extends React.Component { }; indexCurrentData(nextData) { - feed.indexData({ - type: this.props._type, - id: this.props._id, + const { _type, _id, columnName, row, _mapping } = this.props; + + const data = { + type: _type, + id: _id, body: { - [this.props.columnName]: nextData + [columnName]: nextData } - }, 'updateCell', res => this.handleErrorMsg(res)); + }; + + if (_mapping && _mapping._parent && _mapping._routing && _mapping._routing.path && _mapping._routing.required) { + data.parent = row[_mapping._routing.path]; + } + + feed.indexData(data, 'updateCell', res => this.handleErrorMsg(res)); } imageOnLoad = () => { diff --git a/live/src/js/table/DataTable.js b/live/src/js/table/DataTable.js index 3e4cb251..4d574fef 100644 --- a/live/src/js/table/DataTable.js +++ b/live/src/js/table/DataTable.js @@ -283,6 +283,7 @@ class DataTable extends React.Component { columnName={each} _id={data[row]['_id']} _type={data[row]['_type']} + _mapping={mappingObj[type]} visibility={visibility} row={newRow} _checked={newRow._checked}