Andarist / Andarist/react-textarea-autosize

Textarea shrinks vertically, after resetting my form

オープン
#345 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
2.4k
フォーク
247
PR マージ指標
30日以内にマージされた PR はありません

説明

After resetting the form, it appears to save the height from before it was reset. This is not desired in this case.

Before reset:
![image](https://user-images.githubusercontent.com/48702026/171313095-2ab06aee-fd13-4b3b-9140-c7366ecb5188.png)

Then I add content and reset the form

![image](https://user-images.githubusercontent.com/48702026/171313518-04dbc01f-fc71-44ee-a0a9-1a5c014eb5a8.png)

After Refresh:

![image](https://user-images.githubusercontent.com/48702026/171313928-4605a4ea-a4f3-4717-b47c-84a4cf8e0fc5.png)

The behavior I am expecting after a reset of this form, is for the autosize-text-area's to return to the height of the placeholder text.

How can I achieve this behavior?

CSS:
```
.flex-text-area {
display: flex;
flex-direction: column;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
font: 1rem / 1.5 sans-serif;
display: block;
box-sizing: border-box;
width: 100%;
padding: 0.5rem 0.75rem;
}

input,
select,
.text-area-react {
border: 2px solid #333;
background-color: white;
border-radius: 0.25rem;
overflow-y: hidden
}
```

HTML inside of my return function to go to app.js:
```


Residence History



Pets



Employer Contact information



Message:

`
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。