Skip to content

Commit

Permalink
fix(TextArea): disallow resize if cols are specified (#13069)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
tw15egan and kodiakhq[bot] authored Feb 8, 2023
1 parent 8cb0ba1 commit 8edafa0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ export const Default = () => (
<FluidTextArea
labelText="Text Area label"
placeholder="Placeholder text"
cols={50}
rows={4}
id="text-area-1"
/>
);
Expand All @@ -72,26 +70,20 @@ export const DefaultWithLayers = () => (
<FluidTextArea
labelText="Text Area label"
placeholder="Placeholder text"
cols={50}
rows={4}
id="text-area-1"
/>
<br />
<Layer>
<FluidTextArea
labelText="Text Area label"
placeholder="Placeholder text"
cols={50}
rows={4}
id="text-area-1"
/>
<br />
<Layer>
<FluidTextArea
labelText="Text Area label"
placeholder="Placeholder text"
cols={50}
rows={4}
id="text-area-1"
/>
</Layer>
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/components/TextArea/TextArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ const TextArea = React.forwardRef(function TextArea(
useIsomorphicEffect(() => {
if (other.cols) {
textareaRef.current.style.width = null;
textareaRef.current.style.resize = 'none';
} else {
textareaRef.current.style.width = `100%`;
}
Expand Down

0 comments on commit 8edafa0

Please sign in to comment.