Skip to content

Conversation

@dantecatalfamo
Copy link
Contributor

WHY are these changes introduced?

The TextField allows multiline values, but if a long input is created, the component can become extremely tall. maxHeight gives developers an option to cap the height of the element.

I'm creating a page that needs to have a transcript pasted into a textfield, it's possibly very long and required a lot of scrolling to get to the bottom of the form. If I could limit the size of the TextForm component that wouldn't be a problem.

WHAT is this pull request doing?

Adds a maxHeight prop to the TextField component, which adds a max-height property to the component's inline style. It only appears if multiline is present, as it's not required otherwise.

image

@ghost
Copy link

ghost commented Sep 17, 2021

👋 Thanks for opening your first pull request. A contributor should give feedback soon. If you haven’t already, please check out the contributing guidelines.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 17, 2021

size-limit report

Path Size
cjs 163.35 KB (+0.01% 🔺)
esm 96.09 KB (+0.01% 🔺)
esnext 142.99 KB (+0.01% 🔺)
css 34.52 KB (0%)

Copy link
Member

@chloerice chloerice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing @dantecatalfamo!! 🚀

Co-authored-by: Chloe Rice <chloerice@users.noreply.github.com>
@dantecatalfamo
Copy link
Contributor Author

Thanks for the fixup!

@dantecatalfamo dantecatalfamo merged commit a9d1d96 into main Sep 21, 2021
@dantecatalfamo dantecatalfamo deleted the TextField-maxHeight branch September 21, 2021 17:55
@ghost
Copy link

ghost commented Sep 21, 2021

🎉 Thanks for your contribution to Polaris React!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants