Skip to content
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

Support for setting max height on multiline text inputs #6271

Closed
mpcomplete opened this issue Oct 11, 2016 · 2 comments · Fixed by #6310
Closed

Support for setting max height on multiline text inputs #6271

mpcomplete opened this issue Oct 11, 2016 · 2 comments · Fixed by #6310
Assignees
Labels
a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels.

Comments

@mpcomplete
Copy link
Contributor

Multiline text inputs will expand infinitely as more text is entered. The client should be able to specify a max number of rows (and possible a minimum?), and text should scroll vertically.

@mpcomplete mpcomplete self-assigned this Oct 11, 2016
@mpcomplete mpcomplete added framework flutter/packages/flutter repository. See also f: labels. a: text input Entering text in a text field or keyboard related problems labels Oct 11, 2016
Hixie pushed a commit that referenced this issue Oct 14, 2016
* Add a maxLines parameter for multiline Input.

If maxLines is 1, it's a single line Input that scrolls horizontally.
Otherwise, overflowed text wraps and scrolls vertically, taking up at
most `maxLines`.

Also fixed scrolling behavior so that the Input scrolls ensuring the
cursor is always visible.

Fixes #6271

* oops

* comments

* import

* test and RO.update fix

* constant

* fix.caretRect
mpcomplete added a commit that referenced this issue Oct 19, 2016
If maxLines is 1, it's a single line Input that scrolls horizontally.
Otherwise, overflowed text wraps and scrolls vertically, taking up at
most `maxLines`.

Also fixed scrolling behavior so that the Input scrolls ensuring the
cursor is always visible.

Fixes #6271
@QoLTech
Copy link

QoLTech commented Mar 10, 2018

Setting maxLines allows as many lines up to that number, but it also initially starts with that many rows. So, setting maxLines to 5 starts with 5 lines, instead of 1. Is this intended and how can I work around this?

@github-actions
Copy link

github-actions bot commented Sep 3, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants