Closed
Description
Original discussion here: #1229 (comment)
Problem
the
onChange
event that we depend upon here only fires when a user enters text via a keyboard. This means that if there is more than one line of text loaded in (e.g. resuming a form), the height will be restricted to whatever the default is. Is there any way to trigger (or measure) the contentSize so that we can set an accurate initial height?
Potential solutions
- Fix
onChange
like @deanmcpherson did in iOS Text - Modify "onChange" behaviour to allow for all changes in contentSize #6283 - "Add a separate
onContentSizeChange
event which can be observed independently of onTextChange." ([TextInput - Multiline] Reimplemented RCTTextView and added auto height scaling. #1229 (comment)) -- I did this for Android in this commit.
Decision that needs to be made
- Do we push forward with
onContentSizeChange
? (an aside, see our justification for naming). - If yes:
- do we back out of providing layout information in the
onChange
event from TextInput and just provide it inonContentSizeChange
? - who will implement this on iOS?
- do we back out of providing layout information in the