mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 16:23:06 +10:00
🐛 Delete button drags field fix
This commit is contained in:
@ -48,6 +48,7 @@ export default function Field(props: FieldPropsType) {
|
|||||||
onDrag={onControlledDrag}
|
onDrag={onControlledDrag}
|
||||||
onStop={onDragStop}
|
onStop={onDragStop}
|
||||||
defaultPosition={{ x: 0, y: 0 }}
|
defaultPosition={{ x: 0, y: 0 }}
|
||||||
|
cancel="strong"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
ref={nodeRef}
|
ref={nodeRef}
|
||||||
@ -55,7 +56,13 @@ export default function Field(props: FieldPropsType) {
|
|||||||
className="cursor-move opacity-80 p-2 m-auto w-auto flex-row-reverse text-lg font-bold text-center absolute top-0 left-0"
|
className="cursor-move opacity-80 p-2 m-auto w-auto flex-row-reverse text-lg font-bold text-center absolute top-0 left-0"
|
||||||
>
|
>
|
||||||
<div className="m-auto w-auto flex-row-reverse text-lg font-bold text-center">
|
<div className="m-auto w-auto flex-row-reverse text-lg font-bold text-center">
|
||||||
|
{/* todo icons */}
|
||||||
|
{field.type}
|
||||||
|
<div className="text-xs text-center">{props.field.recipient}</div>
|
||||||
|
</div>
|
||||||
|
<strong>
|
||||||
<IconButton
|
<IconButton
|
||||||
|
className="absolute top-0 right-0"
|
||||||
icon={TrashIcon}
|
icon={TrashIcon}
|
||||||
onClick={(event: any) => {
|
onClick={(event: any) => {
|
||||||
if (confirm("Delete field?")) {
|
if (confirm("Delete field?")) {
|
||||||
@ -63,10 +70,7 @@ export default function Field(props: FieldPropsType) {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
></IconButton>
|
></IconButton>
|
||||||
{/* todo icons */}
|
</strong>
|
||||||
{field.type}
|
|
||||||
<div className="text-xs text-center">{props.field.recipient}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</Draggable>
|
</Draggable>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user