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

fix(TextArea): compute height when hidden #1793

Merged
merged 1 commit into from
Jun 23, 2017

Conversation

levithomason
Copy link
Member

@levithomason levithomason commented Jun 23, 2017

Fixes #1405

This PR changes the height calculation do not depend on a visible DOM node. We simply total up the box model height and text height rather than using the scrollHeight.

return (
<ElementType
{...rest}
onChange={this.handleChange}
ref={this.handleRef}
rows={rows}
style={{ ...style, minHeight }}
style={{ resize, height, ...style }}
Copy link
Member

Choose a reason for hiding this comment

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

Can we sort resize and height in alphabetical order? 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

NO! 😛

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorted all keys in objects and force pushed 👍

@codecov-io
Copy link

Codecov Report

Merging #1793 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1793   +/-   ##
=======================================
  Coverage   99.75%   99.75%           
=======================================
  Files         144      144           
  Lines        2465     2465           
=======================================
  Hits         2459     2459           
  Misses          6        6
Impacted Files Coverage Δ
src/addons/TextArea/TextArea.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1b6589e...7bc5f0c. Read the comment docs.

@levithomason levithomason merged commit a6b979d into master Jun 23, 2017
@levithomason levithomason deleted the fix/textarea-autoheight branch June 23, 2017 21:29
@levithomason
Copy link
Member Author

Released in semantic-ui-react@0.70.0

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.

None yet

3 participants