From fcb932dc5d67d133940883da8ad941cbe5b93bc9 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Fri, 17 Feb 2023 19:58:27 +0530 Subject: [PATCH] fix: issue title resizing fix (#300) * fix: issue title resizing fix * fix: header ui fix and invalid date label updated --- .../components/issues/description-form.tsx | 22 +++++-------------- .../components/modules/single-module-card.tsx | 4 +--- apps/app/layouts/app-layout/app-header.tsx | 2 +- 3 files changed, 7 insertions(+), 21 deletions(-) diff --git a/apps/app/components/issues/description-form.tsx b/apps/app/components/issues/description-form.tsx index e1838bfb8..9b6a50cc6 100644 --- a/apps/app/components/issues/description-form.tsx +++ b/apps/app/components/issues/description-form.tsx @@ -1,4 +1,4 @@ -import { FC, useCallback, useEffect, useMemo, useRef, useState } from "react"; +import { FC, useCallback, useEffect, useMemo } from "react"; import dynamic from "next/dynamic"; @@ -7,7 +7,7 @@ import { useForm } from "react-hook-form"; // lodash import debounce from "lodash.debounce"; // components -import { Loader, Input } from "components/ui"; +import { Loader, TextArea } from "components/ui"; const RemirrorRichTextEditor = dynamic(() => import("components/rich-text-editor"), { ssr: false, loading: () => ( @@ -38,8 +38,6 @@ export const IssueDescriptionForm: FC = ({ userAuth, }) => { const { setToastAlert } = useToast(); - const [issueTitleName, setIssueTitleName] = useState(""); - const textareaRef = useRef(null); const { handleSubmit, @@ -106,31 +104,21 @@ export const IssueDescriptionForm: FC = ({ const isNotAllowed = userAuth.isGuest || userAuth.isViewer; - useEffect(() => { - if (textareaRef && textareaRef.current) { - textareaRef.current.style.height = "0px"; - const scrollHeight = textareaRef.current.scrollHeight; - textareaRef.current.style.height = scrollHeight + "px"; - } - }, [issueTitleName]); - return (
-