8000 Fix displaying values passed to TextArea component by kuosandys · Pull Request #4117 · giantswarm/happa · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix displaying values passed to TextArea component #4117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ exports[`TextArea renders a disabled input 1`] = `
class="StyledTextArea-sc-17i3mwp-0 fZhFXE TextArea__StyledInput-sc-ixw2m3-0 sKZiD"
disabled=""
rows="5"
/>
>
The quick brown fox jumps over the lazy dog
</textarea>
</div>
</div>
</div>
Expand All @@ -41,7 +43,9 @@ exports[`TextArea renders a simple input 1`] = `
class="StyledTextArea-sc-17i3mwp-0 dqvSYp TextArea__StyledInput-sc-ixw2m3-0 sKZiD"
placeholder="Please write a story"
rows="5"
/>
>
The quick brown fox jumps over the lazy dog
</textarea>
</div>
</div>
</div>
Expand Down Expand Up @@ -69,7 +73,9 @@ exports[`TextArea renders an input with a help message 1`] = `
<textarea
class="StyledTextArea-sc-17i3mwp-0 dqvSYp TextArea__StyledInput-sc-ixw2m3-0 sKZiD"
rows="5"
/>
>
The quick brown fox jumps over the lazy dog
</textarea>
</div>
</div>
</div>
Expand Down Expand Up @@ -99,7 +105,9 @@ exports[`TextArea renders an input with a label 1`] = `
class="StyledTextArea-sc-17i3mwp-0 dqvSYp TextArea__StyledInput-sc-ixw2m3-0 sKZiD"
id="some-text"
rows="5"
/>
>
The quick brown fox jumps over the lazy dog
</textarea>
</div>
</div>
</div>
Expand All @@ -122,7 +130,9 @@ exports[`TextArea renders an input with a validation error 1`] = `
<textarea
class="StyledTextArea-sc-17i3mwp-0 dqvSYp TextArea__StyledInput-sc-ixw2m3-0 sKZiD"
rows="5"
/>
>
The quick brown fox jumps over the lazy dog
</textarea>
</div>
<span
class="StyledText-sc-1sadyjn-0 OmJsh"
Expand Down Expand Up @@ -150,7 +160,9 @@ exports[`TextArea renders an input with an info message 1`] = `
<textarea
class="StyledTextArea-sc-17i3mwp-0 dqvSYp TextArea__StyledInput-sc-ixw2m3-0 sKZiD"
rows="5"
/>
>
The quick brown fox jumps over the lazy dog
</textarea>
</div>
<span
class="StyledText-sc-1sadyjn-0 fWPyPA"
Expand Down
1 change: 1 addition & 0 deletions src/components/UI/Inputs/TextArea/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ const TextArea = React.forwardRef<HTMLTextAreaElement, ITextAreaProps>(
name={name}
focusIndicator={false}
autoResizeHeight={autoResizeHeight}
value={value}
rows={Math.min(
autoResizeHeight ? getNumberOfRows(value) : rows!,
MAX_ROWS
Expand Down
0