auto textarea height
This commit is contained in:
@@ -224,6 +224,7 @@ export default function ChatBOX(props: {
|
|||||||
</div>
|
</div>
|
||||||
<div className="flex justify-between">
|
<div className="flex justify-between">
|
||||||
<textarea
|
<textarea
|
||||||
|
rows={Math.min(10, (inputMsg.match(/\n/g) || []).length + 2)}
|
||||||
value={inputMsg}
|
value={inputMsg}
|
||||||
onChange={(event: any) => setInputMsg(event.target.value)}
|
onChange={(event: any) => setInputMsg(event.target.value)}
|
||||||
onKeyPress={(event: any) => {
|
onKeyPress={(event: any) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user