File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
packages/gui/src/components Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change 1
- import produce from 'immer'
2
1
import { useState } from 'react'
3
- import { flip , replace , remove , insert } from '../lib/array'
2
+ import { replace , remove , insert } from '../lib/array'
4
3
import { EditorPropsWithLabel } from '../types/editor'
5
4
import { SchemaInput } from './inputs/SchemaInput'
6
5
import { DataTypeSchema } from './schemas/types'
@@ -21,13 +20,6 @@ export default function FieldArray<T>(props: FieldArrayProps<T>) {
21
20
const [ dragIndex , setDragIndex ] = useState ( - 1 )
22
21
const isDragging = dragIndex >= 0
23
22
24
- const handleReorder = ( i1 : number , i2 : number ) => {
25
- if ( typeof value === 'string' ) {
26
- return
27
- }
28
- onChange ( flip ( value , i1 , i2 ) )
29
- }
30
-
31
23
const handleDragDrop = ( i1 : number , i2 : number ) => {
32
24
const item = value [ i1 ]
33
25
const removed = remove ( value , i1 )
You can’t perform that action at this time.
0 commit comments