File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
packages/frontend/src/components/SortableList/components/SortableItem Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change 11import './SortableItem.css'
22
33import type { CSSProperties , PropsWithChildren } from 'react'
4- import { createContext , useContext , useMemo } from 'react'
4+ import React , { createContext , useContext , useMemo } from 'react'
55import type {
66 DraggableSyntheticListeners ,
77 UniqueIdentifier ,
@@ -76,13 +76,7 @@ export function DragHandle(props: { onWarningOpen?: () => void }) {
7676 { ...attributes }
7777 { ...listeners }
7878 ref = { ref }
79- onPointerDown = { ( ) => {
80- if ( shouldWarnOnLeave ) {
81- onWarningOpen ?.( )
82- } else {
83- listeners ?. onPointerDown ?.( )
84- }
85- } }
79+ { ...( shouldWarnOnLeave && { onPointerDown : onWarningOpen } ) }
8680 >
8781 < svg viewBox = "0 0 20 20" width = "12" >
8882 < path d = "M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z" > </ path >
You can’t perform that action at this time.
0 commit comments