react-textarea-autosize

<textarea /> component for React which grows with content

MIT License

Downloads
10.7M
Stars
2.1K
Committers
61

Bot releases are hidden (Show)

react-textarea-autosize - v7.0.0

Published by Andarist over 6 years ago

  • size improvements - removing propTypes in production builds, some micro optimizations
  • distributing "browser" field now with slightly lighter code for browsers
  • valueRowCount property on component's instance holding total row count (including those over maxRows)
  • onChange being called with second argument - this of the component
react-textarea-autosize - v6.1.0

Published by Andarist over 6 years ago

Moved height recalculation to componentDidUpdate hook - should behave the same for all compatible React versions and at the same time won't be using deprecated componentWillReceiveProps hook.

react-textarea-autosize - v6.0.1

Published by Andarist over 6 years ago

  • Bail out from calculating dimenions for detached nodes (fixes #173)
react-textarea-autosize - v6.0.0

Published by Andarist over 6 years ago

No actual changes, sort of a bug fix - documented way of requiring the package in CJS env was to require('react-textarea-autosize').default, but accidentally it got broken way over half a year ago in 5.1.0 (28 July 2017). Since that version CJS envs could do require('react-textarea-autosize') (without additional .default).

Interop between those 2 module formats is tricky if we do not provide additional interop helpers (that were omitted in "broken" versions) when bundling. It caused some issues in mixed SSR / browser development, so it got fixed, but due to long-standing nature of this "bug" it got decided to release this as major version if by any chance somebody has relied on the broken behaviour.

react-textarea-autosize - v5.2.1

Published by Andarist almost 7 years ago

  • accounting for tab-size property during height calculations (thanks to @tmilloff)
react-textarea-autosize - v5.2.0

Published by Andarist almost 7 years ago

  • we are binding requestAnimationFrame to window in development mode to mitigate IE11 quirk with eval source maps
  • we've switched to using babel7-beta internally, should result in slightly smaller and more performant code
react-textarea-autosize - v5.1.0

Published by Andarist about 7 years ago

  • allowed React 16 as peer dependency
  • updated mostly dev dependencies
  • exposing flat bundle from now on
react-textarea-autosize - v5.0.7

Published by Andarist over 7 years ago

  • include font-style attribute in height calculations (thanks to @wokr)
react-textarea-autosize - v5.0.6

Published by Andarist over 7 years ago

  • fixed lifting resize lock
react-textarea-autosize - v5.0.5

Published by Andarist over 7 years ago

  • fixed caching DOM measurements when the feature is used
react-textarea-autosize - v5.0.4

Published by Andarist over 7 years ago

  • fixed SSR regression
react-textarea-autosize - v5.0.3

Published by Andarist over 7 years ago

  • fixed issue with requestAnimationFrame passing its argument (number) to the _resizeComponent and that being passed to setState as callback
react-textarea-autosize - v5.0.2

Published by Andarist over 7 years ago

  • fixed issue with getComputedStyle returning null in Firefox when used in frame with display:none; on it
react-textarea-autosize - v5.0.1

Published by Andarist over 7 years ago

  • introduced work around Firefox bug which runs resize listeners even when other JS is running at the same moment - causing competing rerenders (due to setState calls in the listener) in React. More can be found here - facebook/react#6324
react-textarea-autosize - v5.0.0

Published by Andarist over 7 years ago

BREAKING CHANGES

  • dropped support for reading internally (for DOM measurements) prefixed box-sizing
  • dropped support for proxy (to underlaying DOM node) methods on the instance - value, selectionStart , selectionEnd setters/getters, focus and blur (accessible before through ref on the component). If you need access to those please use inputRef prop to get ref of the underlaying DOM node and use native methods on it
  • dropped support for the valueLink prop which supported using LinkedStateMixin which is deprecated since React 15
  • dropped rows prop alias, please use minRows instead (previously it was the same thing anyway)

NEW IN THE RELEASE

  • passing this as second argument to the onHeightChange callback
  • providing rowCount property on the instance which is the reason why this is passed to onHeightChange - so the rowCount may be accessed, this is for now the only prop supported that you may access, please do not use any internal stuff
  • using incrementing uid as cache key - important when using useCacheForDOMMeasurements prop, providing id or name to the component is no longer required for the cache to work
react-textarea-autosize - v4.3.2

Published by Andarist over 7 years ago

  • fixed SSR regression introduced in v4.3.2 by window/document checks
react-textarea-autosize - v4.3.1

Published by Andarist over 7 years ago

  • accounting for various border widths, measuring them independently rather than just geting border-width
  • fixed IE height measurements for border-boxed elements, it seems that IE returns computed width/height for content only, while other browsers add padding and border (correctly). Behaviour can be checked here. Every browser returns 100px, IE11 would return 80px
react-textarea-autosize - v4.3.0

Published by Andarist over 7 years ago

  • reattaching hiddenTextarea (used for measurements) to the DOM in case it gets deattached some how (by external scripts such as turbolinks in example)
  • added UMD builds built with Rollup
react-textarea-autosize - v4.0.0

Published by Andarist over 7 years ago

  • [BREAKING] Code is now built using Babel 6.

    That means that CommonJS code consuming react-textarea-autosize package should
    change their require calls from:

    var Textarea = require('react-textarea-autosize')
    

    to:

    var Textarea = require('react-textarea-autosize').default
    
  • [MINOR] Support for React 15.

react-textarea-autosize - v4.2.2

Published by Andarist over 7 years ago

  • added possibility to pass initial height through props.style.height
  • restored height calculation in onChange for uncontrolled inputs
Package Rankings
Top 0.79% on Npmjs.org
Top 24.44% on Repo1.maven.org
Badges
Extracted from project README
npm version npm