@@ -881,7 +881,8 @@ class BootstrapTable extends Component {
881
881
invalid ( ) ;
882
882
}
883
883
} ;
884
- const isValid = beforeSaveCell ( this . state . data [ rowIndex ] , fieldName , newVal , beforeSaveCellCB ) ;
884
+ const props = { rowIndex, colIndex } ;
885
+ const isValid = beforeSaveCell ( this . state . data [ rowIndex ] , fieldName , newVal , beforeSaveCellCB , props ) ;
885
886
if ( isValid === false && typeof isValid !== 'undefined' ) {
886
887
return invalid ( ) ;
887
888
} else if ( isValid === Const . AWAIT_BEFORE_CELL_EDIT ) {
@@ -897,13 +898,14 @@ class BootstrapTable extends Component {
897
898
const { afterSaveCell } = this . props . cellEdit ;
898
899
const columns = this . getColumnsDescription ( this . props ) ;
899
900
const fieldName = columns [ colIndex ] . name ;
901
+ const props = { rowIndex, colIndex } ;
900
902
if ( onCellEdit ) {
901
903
newVal = onCellEdit ( this . state . data [ rowIndex ] , fieldName , newVal ) ;
902
904
}
903
905
904
906
if ( this . allowRemote ( Const . REMOTE_CELL_EDIT ) ) {
905
907
if ( afterSaveCell ) {
906
- afterSaveCell ( this . state . data [ rowIndex ] , fieldName , newVal ) ;
908
+ afterSaveCell ( this . state . data [ rowIndex ] , fieldName , newVal , props ) ;
907
909
}
908
910
return ;
909
911
}
@@ -917,7 +919,7 @@ class BootstrapTable extends Component {
917
919
} ) ;
918
920
919
921
if ( afterSaveCell ) {
920
- afterSaveCell ( this . state . data [ rowIndex ] , fieldName , newVal ) ;
922
+ afterSaveCell ( this . state . data [ rowIndex ] , fieldName , newVal , props ) ;
921
923
}
922
924
}
923
925
0 commit comments