Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Use native autosizing for Ensu composer

Manav Rathi59f33747f4a1
diff --git a/web/apps/ensu/src/components/chat/ChatInput.tsx b/web/apps/ensu/src/components/chat/ChatInput.tsx
index 3ce5c8b9b9..c6a9aee48a 100644
--- a/web/apps/ensu/src/components/chat/ChatInput.tsx
+++ b/web/apps/ensu/src/components/chat/ChatInput.tsx
@@ -90,7 +90,8 @@ export const ChatInput = memo(
>
<InputBase
multiline
- maxRows={5}
+ inputComponent="textarea"
+ inputProps={{ rows: 1, type: undefined }}
inputRef={inputRef}
placeholder={
isDownloading
@@ -122,7 +123,13 @@ export const ChatInput = memo(
fontSize: "15px",
lineHeight: 1.7,
color: "text.base",
- "& textarea": { padding: 0, margin: 0 },
+ "& textarea": {
+ fieldSizing: "content",
+ maxHeight: "8.5em",
+ overflowY: "auto",
+ padding: 0,
+ margin: 0,
+ },
"& code": {
fontFamily:
'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',