File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
src/dashboard/Data/Browser Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -954,8 +954,24 @@ class Browser extends DashboardView {
954
954
}
955
955
} ) ;
956
956
} catch ( error ) {
957
- if ( error . code === 137 ) {
958
- this . addEditCloneRows ( toClone ) ;
957
+ if ( error . code === 137 ) {
958
+ let failedSaveObj = [ ] ;
959
+ let savedObjects = [ ] ;
960
+ toClone . forEach ( cloneObj => {
961
+ cloneObj . dirty ( )
962
+ ? failedSaveObj . push ( cloneObj )
963
+ : savedObjects . push ( cloneObj ) ;
964
+ } ) ;
965
+ if ( savedObjects . length ) {
966
+ this . setState ( {
967
+ data : [ ...savedObjects , ...this . state . data ] ,
968
+ counts : {
969
+ ...this . state . counts ,
970
+ [ className ] : this . state . counts [ className ] + savedObjects . length
971
+ }
972
+ } ) ;
973
+ }
974
+ this . addEditCloneRows ( failedSaveObj ) ;
959
975
}
960
976
this . setState ( {
961
977
selection : { } ,
You can’t perform that action at this time.
0 commit comments