-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
project:react-native-webIssue associated with react-native-webIssue associated with react-native-web
Description
In react-native TextInput is always autoexpandable. See facebook/react-native@dabb78b
I think simplest way to implement this is to use https://github.com/rpearce/react-expanding-textarea
It's just update textarea height based on el.scrollHeight:
_handleChange(e) {
const { onChange } = this.props
if (onChange) onChange(e)
this._adjustTextarea(e)
}
_adjustTextarea({ target = this.el }) {
target.style.height = 0
target.style.height = `${target.scrollHeight}px`
}
}
gut4, SkyzohKey, steida, brunolemos, Asim13se and 10 more
Metadata
Metadata
Assignees
Labels
project:react-native-webIssue associated with react-native-webIssue associated with react-native-web