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