Skip to content

onContentSizeChange support for growing multiline TextInput #6552

Closed
@brentvatne

Description

@brentvatne

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

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 in onContentSizeChange?
    • who will implement this on iOS?

@nicklockwood @deanmcpherson @bestander

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions