Skip to content

Commit

Permalink
Merge pull request #16 from e-roy/bug-fix-height-issue
Browse files Browse the repository at this point in the history
  • Loading branch information
e-roy authored Jan 7, 2024
2 parents f5e4904 + 04d8590 commit a34e665
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/CommonForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ export const CommonForm: React.FC<CommonFormProps> = ({
const handleTextAreaInput = useCallback(
(event: React.ChangeEvent<HTMLTextAreaElement>) => {
onInputChange(event);
const target = event.currentTarget;
setTextareaHeight(`${target.scrollHeight}px`);
adjustTextareaHeight(event.currentTarget);
},
[onInputChange]
);
Expand Down Expand Up @@ -102,7 +101,7 @@ export const CommonForm: React.FC<CommonFormProps> = ({
onKeyDown={handleKeyPress}
style={{ height: textareaHeight }}
rows={1}
className="flex-1 p-2 resize-none overflow-hidden min-h-8 rounded"
className="flex-1 p-2 resize-none min-h-8 rounded max-h-[50vh]"
placeholder={placeholder}
/>
<div className="mt-auto">
Expand Down

0 comments on commit a34e665

Please sign in to comment.