File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,11 @@ export const useDeepValues = (
143143 arrayOfIds = arrayOfIds . concat ( data ) ;
144144 }
145145
146+ if ( fieldChanges . update ) {
147+ const updatedIds = fieldChanges . update . map ( ( { id } ) => id ) ;
148+ arrayOfIds = arrayOfIds . filter ( ( id ) => ! updatedIds . includes ( id ) ) ;
149+ }
150+
146151 if ( fieldChanges . delete ) {
147152 arrayOfIds = arrayOfIds . filter ( ( id ) => ! fieldChanges . delete ! . includes ( id ) ) ;
148153 }
@@ -182,7 +187,7 @@ export const useDeepValues = (
182187 }
183188 }
184189
185- // must concat after request, created items doenst have ids
190+ // must concat after request, created items doesn't have ids
186191 if ( fieldChanges . create ) {
187192 arrayOfData = arrayOfData . concat ( fieldChanges . create ) ;
188193 }
You can’t perform that action at this time.
0 commit comments