File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,12 @@ export
116116 this . data_model . changed . connect ( ( sender : ViewBasedJSONModel , args : any ) => {
117117 if ( args . type === 'cells-changed' ) {
118118 const value = this . data_model . data ( args . region , args . row , args . column ) ;
119- const datasetRow = this . data_model . getDatasetRowFromView ( args . region , args . row )
119+ const datasetRow = this . data_model . getDatasetRowFromView ( args . region , args . row ) ;
120+ // Getting a copy of the data and update the front-end model in place
121+ const newData = this . get ( '_data' ) ;
122+ newData . data [ datasetRow ] [ args . column ] = value ;
123+ this . set ( '_data' , newData ) ;
124+ // Update backend with new data
120125 this . comm . send ( {
121126 method : 'custom' ,
122127 content : {
@@ -129,7 +134,6 @@ export
129134 } , null ) ;
130135 }
131136 } ) ;
132-
133137 this . updateTransforms ( ) ;
134138 this . trigger ( 'data-model-changed' ) ;
135139 this . updateSelectionModel ( ) ;
You can’t perform that action at this time.
0 commit comments