From bf75bdbd598e2b630b2aa46614636733dd3187a3 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Wed, 27 Sep 2023 21:36:47 -0300 Subject: [PATCH] Added nodelete class to not delete node when not selecting a text on modal --- .../EditFlowSettingsComponent/index.tsx | 4 ++-- src/frontend/src/components/ui/dialog.tsx | 7 +++---- src/frontend/src/components/ui/input.tsx | 5 ++++- src/frontend/src/components/ui/rename-label.tsx | 2 +- src/frontend/src/components/ui/textarea.tsx | 5 ++++- src/frontend/src/modals/dictAreaModal/index.tsx | 2 +- .../FlowPage/components/PageComponent/index.tsx | 16 +++++++++++++++- .../components/extraSidebarComponent/index.tsx | 2 +- 8 files changed, 31 insertions(+), 12 deletions(-) diff --git a/src/frontend/src/components/EditFlowSettingsComponent/index.tsx b/src/frontend/src/components/EditFlowSettingsComponent/index.tsx index 8f9907129..28a7fc69c 100644 --- a/src/frontend/src/components/EditFlowSettingsComponent/index.tsx +++ b/src/frontend/src/components/EditFlowSettingsComponent/index.tsx @@ -67,7 +67,7 @@ export const EditFlowSettings: React.FC = ({ )} = ({ name="description" id="description" onChange={handleDescriptionChange} - value={description} + value={description!} placeholder="Flow description" className="mt-2 max-h-[100px] font-normal" rows={3} diff --git a/src/frontend/src/components/ui/dialog.tsx b/src/frontend/src/components/ui/dialog.tsx index 551fa281c..784ad7899 100644 --- a/src/frontend/src/components/ui/dialog.tsx +++ b/src/frontend/src/components/ui/dialog.tsx @@ -8,12 +8,11 @@ const Dialog = DialogPrimitive.Root; const DialogTrigger = DialogPrimitive.Trigger; const DialogPortal = ({ - className, children, ...props }: DialogPrimitive.DialogPortalProps) => ( - -
+ +
{children}
@@ -27,7 +26,7 @@ const DialogOverlay = React.forwardRef< ( return ( diff --git a/src/frontend/src/components/ui/rename-label.tsx b/src/frontend/src/components/ui/rename-label.tsx index 4930aedca..d9e77f4cf 100644 --- a/src/frontend/src/components/ui/rename-label.tsx +++ b/src/frontend/src/components/ui/rename-label.tsx @@ -57,7 +57,7 @@ export default function RenameLabel(props) { ref={inputRef} onInput={resizeInput} className={cn( - "nopan nodrag noundo nocopy rounded-md bg-transparent px-2 outline-ring hover:outline focus:border-none focus:outline active:outline", + "nopan nodelete nodrag noundo nocopy rounded-md bg-transparent px-2 outline-ring hover:outline focus:border-none focus:outline active:outline", props.className )} onBlur={() => { diff --git a/src/frontend/src/components/ui/textarea.tsx b/src/frontend/src/components/ui/textarea.tsx index cfad1cf72..1f2970545 100644 --- a/src/frontend/src/components/ui/textarea.tsx +++ b/src/frontend/src/components/ui/textarea.tsx @@ -8,7 +8,10 @@ const Textarea = React.forwardRef( ({ className, ...props }, ref) => { return (