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

chore(TextArea): rows logic #1714

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

chore(TextArea): rows logic #1714

wants to merge 5 commits into from

Conversation

GermanVor
Copy link
Contributor

@GermanVor GermanVor commented Jul 18, 2024

It will be very useful to have y scrollbar depending not only on rows or maxRows values, but on height of the TextArea.

now it is possible to pass height value via TextAreaProps.className to see y-scrollbar

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@gravity-ui-bot
Copy link
Contributor

Visual Tests Report is ready.

@GermanVor
Copy link
Contributor Author

may be it is extra now.

I did not check

@GermanVor GermanVor requested a review from teleginzhenya July 24, 2024 12:20

control.style.height = 'auto';
let currentRowsNumber = (innerValue?.match(/\n/g) || []).length + 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

It does not work in case of long strings without \n

Copy link
Contributor Author

@GermanVor GermanVor Aug 12, 2024

Choose a reason for hiding this comment

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

you are right, better calculate rows number depend on height

9086c1b

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.

3 participants