File tree 1 file changed +5
-3
lines changed
packages/main/src/components/FilterBar
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -310,12 +310,14 @@ export const FilterDialog = (props: FilterDialogPropTypes) => {
310
310
311
311
useEffect ( ( ) => {
312
312
if ( currentReorderedItem ?. index != null ) {
313
- setOrderedChildren ( ( prev : any [ ] ) => {
314
- const { index, direction } = currentReorderedItem ;
313
+ const { index, direction } = currentReorderedItem ;
314
+ setOrderedChildren ( ( prevChildren : ReactElement < FilterGroupItemInternalProps > [ ] ) => {
315
+ const prev = [ ...prevChildren ] ;
315
316
switch ( direction ) {
316
317
case 'up' :
317
318
if ( index > 0 ) {
318
319
setUpdatedIndex ( index - 1 ) ;
320
+
319
321
const temp = prev [ index ] ;
320
322
prev [ index ] = prev [ index - 1 ] ;
321
323
prev [ index - 1 ] = temp ;
@@ -344,7 +346,7 @@ export const FilterDialog = (props: FilterDialogPropTypes) => {
344
346
}
345
347
break ;
346
348
}
347
- return [ ... prev ] ;
349
+ return prev ;
348
350
} ) ;
349
351
void currentReorderedItem . target . focus ( ) ;
350
352
}
You can’t perform that action at this time.
0 commit comments