react-textarea-autosize

<textarea /> component for React which grows with content

MIT License

Downloads
10.7M
Stars
2.1K
Committers
61

Bot releases are visible (Hide)

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
react-textarea-autosize - v4.2.1

Published by Andarist over 7 years ago

  • fixed cursor jumps caused for controlled inputs (culprit: doubled height calculations - pre and post change)
  • added safe guard check before calculating element's height for non-browser environment (i.e. during tests)
  • optimized calls to setState, now it's called only when some change happened
  • applying style properties directly (style.setProperty) instead of element.setAttribute('style', ...) to avoid CSP issues with unsafe-inline
react-textarea-autosize - v4.2.0

Published by Andarist over 7 years ago

  • added es build, more suitable for es6 modules aware tools like rollup and webpack2
  • switched to babel's loose mode
  • fixed inputRef being passed to the underlaying element which caused unused properties warning
react-textarea-autosize - v4.1.0

Published by Andarist over 7 years ago

  • switched to using PropTypes from external package (fixed React 15.5.0 deprecation warning)
  • added new prop - inputRef which gets passed as ref callback to the underlaying element
react-textarea-autosize - v4.0.5

Published by Andarist over 7 years ago

  • decided not to support IE8 ever (previous status - PR welcomed)
  • reverted the change using '' instead of 'x' to calculate the height of empty textarea
Package Rankings
Top 0.79% on Npmjs.org
Top 24.44% on Repo1.maven.org
Badges
Extracted from project README
npm version npm