fix selectRow doesnt pass to CellEditContext

This commit is contained in:
AllenFang 2018-05-30 17:50:05 +08:00
parent fc0b99e8a0
commit 167352f199
2 changed files with 3 additions and 0 deletions

View File

@ -16,6 +16,7 @@ export default (
class CellEditProvider extends React.Component {
static propTypes = {
data: PropTypes.array.isRequired,
selectRow: PropTypes.object,
options: PropTypes.shape({
mode: PropTypes.oneOf([CLICK_TO_CELL_EDIT, DBCLICK_TO_CELL_EDIT]).isRequired,
onErrorMessageDisappear: PropTypes.func,
@ -101,6 +102,7 @@ export default (
cellEdit: {
options: { nonEditableRows, errorMessage, ...optionsRest },
editingCellFactory,
createContext,
...cellEditRest
}
} = this.props;

View File

@ -170,6 +170,7 @@ const withContext = Base =>
return rootProps => (
<this.CellEditContext.Provider
{ ...baseProps }
selectRow={ this.props.selectRow }
cellEdit={ this.props.cellEdit }
data={ rootProps.getData() }
>