Skip to content

Releases: Andarist/react-textarea-autosize

v8.3.0

05 Nov 20:32
613c59d
Compare
Choose a tag to compare

Minor Changes

  • a16a46d #296 Thanks @RDIL! - Allow React 17 in the specified peer dependency range.

v8.2.0

30 Jun 18:53
f0f6b16
Compare
Choose a tag to compare

Minor Changes

  • a1fc99f #284 Thanks @emmenko! - Added { rowHeight: number } as a second parameter to the onHeightChange callback. This is useful to construct custom behaviors according to the height values.

v8.1.1

25 Jun 06:02
cb07cdd
Compare
Choose a tag to compare

Patch Changes

  • b7c227a #280 Thanks @emdotem! - Fixed a broken call to setProperty that has prevented the library to work correctly.

v8.1.0

24 Jun 21:33
423eb42
Compare
Choose a tag to compare

Minor Changes

  • 722e10a #278 Thanks @emdotem! - Set inline style's height property with the "important" priority.

Patch Changes

  • db872f0 Thanks @Andarist! - TextareaAutosizeProps are now based on React.TextareaHTMLAttributes<HTMLTextAreaElement> instead of JSX.IntrinsicElements['textarea']. The latter one includes a type for ref attribute and it being included as part of TextareaAutosizeProps has caused problems when using TextareaAutosizeProps to declare wrapper components. This is also more semantically correct as ref shouldn't be a part of props. It's rather accepted by a particular JSX element and in case of the react-textarea-autosize this is the type of the exported component which is React.ForwardRefExoticComponent<TextareaAutosizeProps> (a result of React.forwardRef call).

  • 61ca826 Thanks @Andarist! - maxHeight and minHeight has been disallowed as part of TextareaAutosizeProps['style']. The intention to do that was there since the v8 release but it was not implemented correctly and allowed those to slip into the mentioned type.

v8.0.1: Version Packages (#267)

24 May 21:09
6e76a1c
Compare
Choose a tag to compare

Patch Changes

  • 2307033 #266 Thanks @vlazh! - Fixed a regression with calculating too high height for textareas with box-sizing: border-box;.

  • 1d1bba2 #265 Thanks @SimenB! - Exported TextareaAutosizeProps type for convenience.

  • da960f4 Thanks @Andarist! - Fixed an issue with internal cache not being populated correctly when using cacheMeasurements prop.

v8.0.0: Version Packages (#264)

23 May 22:04
1875690
Compare
Choose a tag to compare

Major Changes

  • The package has been rewritten in TypeScript so type definitions are now included in the package itself. There is no need to install separate types from the DefinitelyTyped.
  • At the same time the package internals have been rewritten to use React's hooks API. This means that the peer dependency requirement for React version had to be changed to ^16.8.0.
  • You can now use ref prop to get access to the underlaying textarea element as React.forwardRef is being used now. The support for innerRef has been completely removed.
  • useCacheForDOMMeasurements prop has been renamed to cacheMeasurements.
  • onHeightChange callback no longer receives the second argument. It was the component's instance (its this), but as the component is now implemented using hooks there no longer is any instance that could be given to a consumer like that.
  • Removed handling props.style.maxHeight and props.style.minHeight values. If you need to control those boundaries you should use maxRows and minRows props respectively.

Minor Changes

  • The height is being set now directly on the underlaying textarea element and not caused by updating internal state and this triggering React's rerender. This shouldn't make for any observable difference for consumers of this package.

v7.0.0

09 Jul 11:42
Compare
Choose a tag to compare
  • 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

v6.1.0

02 Apr 18:28
Compare
Choose a tag to compare

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.

v6.0.1

25 Mar 00:27
Compare
Choose a tag to compare
  • Bail out from calculating dimenions for detached nodes (fixes #173)

v6.0.0

05 Mar 14:44
Compare
Choose a tag to compare

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.