@@ -7,8 +7,9 @@ import { CLICK_TO_CELL_EDIT, DBCLICK_TO_CELL_EDIT } from './const';
7
7
export default (
8
8
Base ,
9
9
{ _, remoteResolver }
10
- ) =>
11
- class CellEditWrapper extends remoteResolver ( Component ) {
10
+ ) => {
11
+ let EditingCell ;
12
+ return class CellEditWrapper extends remoteResolver ( Component ) {
12
13
static propTypes = {
13
14
options : PropTypes . shape ( {
14
15
mode : PropTypes . oneOf ( [ CLICK_TO_CELL_EDIT , DBCLICK_TO_CELL_EDIT ] ) . isRequired ,
@@ -24,6 +25,7 @@ export default (
24
25
25
26
constructor ( props ) {
26
27
super ( props ) ;
28
+ EditingCell = props . cellEdit . editingCellFactory ( _ ) ;
27
29
this . startEditing = this . startEditing . bind ( this ) ;
28
30
this . escapeEditing = this . escapeEditing . bind ( this ) ;
29
31
this . completeEditing = this . completeEditing . bind ( this ) ;
@@ -104,7 +106,7 @@ export default (
104
106
const { isDataChanged, ...stateRest } = this . state ;
105
107
const {
106
108
cellEdit : {
107
- options : { nonEditableRows, ...optionsRest } ,
109
+ options : { nonEditableRows, errorMessage , ...optionsRest } ,
108
110
editingCellFactory,
109
111
...cellEditRest
110
112
}
@@ -113,8 +115,8 @@ export default (
113
115
...optionsRest ,
114
116
...cellEditRest ,
115
117
...stateRest ,
118
+ EditingCell,
116
119
nonEditableRows : _ . isDefined ( nonEditableRows ) ? nonEditableRows ( ) : [ ] ,
117
- EditingCell : editingCellFactory ( _ ) ,
118
120
onStart : this . startEditing ,
119
121
onEscape : this . escapeEditing ,
120
122
onUpdate : this . handleCellUpdate
@@ -130,3 +132,4 @@ export default (
130
132
) ;
131
133
}
132
134
} ;
135
+ } ;
0 commit comments