<textarea /> component for React which grows with content
MIT License
Bot releases are hidden (Show)
Published by Andarist over 6 years ago
propTypes
in production builds, some micro optimizations"browser"
field now with slightly lighter code for browsersvalueRowCount
property on component's instance holding total row count (including those over maxRows
)onChange
being called with second argument - this
of the componentPublished 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.
Published by Andarist over 6 years ago
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.
Published by Andarist almost 7 years ago
tab-size
property during height calculations (thanks to @tmilloff)Published by Andarist almost 7 years ago
requestAnimationFrame
to window in development mode to mitigate IE11 quirk with eval source maps
Published by Andarist about 7 years ago
Published by Andarist over 7 years ago
font-style
attribute in height calculations (thanks to @wokr)Published by Andarist over 7 years ago
Published by Andarist over 7 years ago
Published by Andarist over 7 years ago
Published by Andarist over 7 years ago
requestAnimationFrame
passing its argument (number) to the _resizeComponent
and that being passed to setState
as callbackPublished by Andarist over 7 years ago
getComputedStyle
returning null
in Firefox when used in frame with display:none;
on itPublished by Andarist over 7 years ago
setState
calls in the listener) in React. More can be found here - facebook/react#6324Published by Andarist over 7 years ago
BREAKING CHANGES
box-sizing
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 itvalueLink
prop which supported using LinkedStateMixin
which is deprecated since React 15rows
prop alias, please use minRows
instead (previously it was the same thing anyway)NEW IN THE RELEASE
this
as second argument to the onHeightChange
callbackrowCount
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 stuffuid
as cache key - important when using useCacheForDOMMeasurements
prop, providing id
or name
to the component is no longer required for the cache to workPublished by Andarist over 7 years ago
v4.3.2
by window
/document
checksPublished by Andarist over 7 years ago
border-width
100px
, IE11 would return 80px
Published by Andarist over 7 years ago
hiddenTextarea
(used for measurements) to the DOM in case it gets deattached some how (by external scripts such as turbolinks in example)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.
Published by Andarist over 7 years ago
height
through props.style.height
onChange
for uncontrolled inputs