From fe16743d163cedb4cb8d0341d73f441ec4e840d2 Mon Sep 17 00:00:00 2001 From: AkashJana18 Date: Wed, 6 Nov 2024 12:39:38 +0530 Subject: [PATCH] fix/scrollbar in input textarea --- frontend/src/conversation/Conversation.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/frontend/src/conversation/Conversation.tsx b/frontend/src/conversation/Conversation.tsx index 5c8a187b..be0fb040 100644 --- a/frontend/src/conversation/Conversation.tsx +++ b/frontend/src/conversation/Conversation.tsx @@ -1,29 +1,30 @@ import { Fragment, useEffect, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useDispatch, useSelector } from 'react-redux'; -import newChatIcon from '../assets/openNewChat.svg'; +import { useNavigate } from 'react-router-dom'; +import Hero from '../Hero'; import ArrowDown from '../assets/arrow-down.svg'; +import newChatIcon from '../assets/openNewChat.svg'; import Send from '../assets/send.svg'; import SendDark from '../assets/send_dark.svg'; +import ShareIcon from '../assets/share.svg'; import SpinnerDark from '../assets/spinner-dark.svg'; import Spinner from '../assets/spinner.svg'; import RetryIcon from '../components/RetryIcon'; -import { useNavigate } from 'react-router-dom'; -import Hero from '../Hero'; import { useDarkTheme, useMediaQuery } from '../hooks'; import { ShareConversationModal } from '../modals/ShareConversationModal'; -import { setConversation, updateConversationId } from './conversationSlice'; import { selectConversationId } from '../preferences/preferenceSlice'; import { AppDispatch } from '../store'; import ConversationBubble from './ConversationBubble'; import { handleSendFeedback } from './conversationHandlers'; import { FEEDBACK, Query } from './conversationModels'; -import ShareIcon from '../assets/share.svg'; import { addQuery, fetchAnswer, selectQueries, selectStatus, + setConversation, + updateConversationId, updateQuery, } from './conversationSlice'; @@ -309,7 +310,7 @@ export default function Conversation() { ref={inputRef} tabIndex={1} placeholder={t('inputPlaceholder')} - className={`inputbox-style w-full overflow-y-hidden overflow-x-hidden whitespace-pre-wrap rounded-full bg-transparent py-5 text-base leading-tight opacity-100 focus:outline-none dark:bg-transparent dark:text-bright-gray`} + className={`inputbox-style w-full overflow-y-auto overflow-x-hidden whitespace-pre-wrap rounded-full bg-transparent py-5 text-base leading-tight opacity-100 focus:outline-none dark:bg-transparent dark:text-bright-gray`} onInput={handleInput} onKeyDown={(e) => { if (e.key === 'Enter' && !e.shiftKey) {