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

[text-field] vaadin-text-area should not constrain minimum size to 2 lines #1363

Open
manolo opened this issue Jun 6, 2018 · 4 comments · May be fixed by #8168
Open

[text-field] vaadin-text-area should not constrain minimum size to 2 lines #1363

manolo opened this issue Jun 6, 2018 · 4 comments · May be fixed by #8168
Labels
enhancement New feature or request UX User experience issue vaadin-text-field

Comments

@manolo
Copy link
Member

manolo commented Jun 6, 2018

In MD would be desirable to start writing with one line. It makes easier to align visually with other elements.

Found during MD UX tests

@heruan
Copy link
Member

heruan commented Oct 7, 2018

I think this holds also for Lumo: a text area should have a configurable minimum row height setting, but by default should have a single row (basically a text field able to grow).

jouni referenced this issue in vaadin/vaadin-messages Feb 16, 2021
Things that need to be configurable:

TextArea aria-label
Button label, icon and theme

Fixes #16
@vaadin-bot vaadin-bot transferred this issue from vaadin/vaadin-text-field May 19, 2021
@vlukashov vlukashov added UX User experience issue and removed UX finding labels May 19, 2021
@web-padawan web-padawan changed the title vaadin-text-area should not constrain minimum size to 2 lines [text-field] vaadin-text-area should not constrain minimum size to 2 lines May 28, 2021
@rolfsmeds rolfsmeds added the enhancement New feature or request label Oct 19, 2021
@MingjieZhu
Copy link

MingjieZhu commented Feb 10, 2022

We need this too. ( I was able to use JavaScript to auto shrink the textarea in Vaadin 8 )
In Vaadin 22, I tried JavaScript setting rows=1 but that doesn't help much. it only reduced 5% height.
Force smaller height will result a scroll bar. And setting overflow = hidden cannot hide the scroll bar for some reason.

@jouni
Copy link
Member

jouni commented Feb 11, 2022

As a workaround, you need to be able to set rows=1 on the internal <textarea> element.

@MingjieZhu
Copy link

As a workaround, you need to be able to set rows=1 on the internal <textarea> element.

That no longer work on Vaadin 22, here's what I did: textareaField.getElement().executeJs("this.querySelector('textarea').rows = $0;", 1);
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request UX User experience issue vaadin-text-field
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants