Skip to content

Commit

Permalink
Merge branch 'martin-pepgit-issue_945'
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrn committed Aug 15, 2019
2 parents 3f34137 + 9496ff7 commit e687c8b
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 22 deletions.
1 change: 1 addition & 0 deletions src/components/m-table-body.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ class MTableBody extends React.Component {
options={this.props.options}
isTreeData={this.props.isTreeData}
hasAnyEditingRow={this.props.hasAnyEditingRow}
localization={{ ...MTableBody.defaultProps.localization.editRow, ...this.props.localization.editRow }}
/>
));
}
Expand Down
68 changes: 46 additions & 22 deletions src/components/m-table-group-row.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,51 @@ export default class MTableGroupRow extends React.Component {
));
}
else {
detail = this.props.groupData.data.map((rowData, index) => (
<this.props.components.Row
actions={this.props.actions}
key={index}
columns={this.props.columns}
components={this.props.components}
data={rowData}
detailPanel={this.props.detailPanel}
getFieldValue={this.props.getFieldValue}
icons={this.props.icons}
path={[...this.props.path, index]}
onRowSelected={this.props.onRowSelected}
onRowClick={this.props.onRowClick}
onToggleDetailPanel={this.props.onToggleDetailPanel}
options={this.props.options}
isTreeData={this.props.isTreeData}
onTreeExpandChanged={this.props.onTreeExpandChanged}
onEditingCanceled={this.props.onEditingCanceled}
onEditingApproved={this.props.onEditingApproved}
hasAnyEditingRow={this.props.hasAnyEditingRow}
/>
));
detail = this.props.groupData.data.map((rowData, index) => {
if (rowData.tableData.editing) {
return (
<this.props.components.EditRow
columns={this.props.columns}
components={this.props.components}
data={rowData}
icons={this.props.icons}
path={[...this.props.path, index]}
localization={this.props.localization}
key={index}
mode={rowData.tableData.editing}
options={this.props.options}
isTreeData={this.props.isTreeData}
detailPanel={this.props.detailPanel}
onEditingCanceled={this.props.onEditingCanceled}
onEditingApproved={this.props.onEditingApproved}
getFieldValue={this.props.getFieldValue}
/>
);
} else {
return (
<this.props.components.Row
actions={this.props.actions}
key={index}
columns={this.props.columns}
components={this.props.components}
data={rowData}
detailPanel={this.props.detailPanel}
getFieldValue={this.props.getFieldValue}
icons={this.props.icons}
path={[...this.props.path, index]}
onRowSelected={this.props.onRowSelected}
onRowClick={this.props.onRowClick}
onToggleDetailPanel={this.props.onToggleDetailPanel}
options={this.props.options}
isTreeData={this.props.isTreeData}
onTreeExpandChanged={this.props.onTreeExpandChanged}
onEditingCanceled={this.props.onEditingCanceled}
onEditingApproved={this.props.onEditingApproved}
hasAnyEditingRow={this.props.hasAnyEditingRow}
/>
);
}
});
}
}

Expand Down Expand Up @@ -137,6 +160,7 @@ MTableGroupRow.propTypes = {
icons: PropTypes.object,
isTreeData: PropTypes.bool.isRequired,
level: PropTypes.number,
localization: PropTypes.object,
onGroupExpandChanged: PropTypes.func,
onRowSelected: PropTypes.func,
onRowClick: PropTypes.func,
Expand Down

0 comments on commit e687c8b

Please sign in to comment.