Skip to content

feat: add maxLength support to EnrichedTextInput#527

Open
xiamu14 wants to merge 1 commit intosoftware-mansion:mainfrom
xiamu14:codex/add-max-length-support
Open

feat: add maxLength support to EnrichedTextInput#527
xiamu14 wants to merge 1 commit intosoftware-mansion:mainfrom
xiamu14:codex/add-max-length-support

Conversation

@xiamu14
Copy link
Copy Markdown

@xiamu14 xiamu14 commented Apr 9, 2026

Summary

  • add maxLength support to EnrichedTextInput
  • emit onMaxLengthExceeded when native input rejects text that would exceed the limit
  • wire the new prop through the JS/native bridge on Android and iOS

Why

Some apps need to block rich-text input before content is inserted, instead of accepting text and reverting it afterward. This is especially important for candidate insertion and other multi-character commits.

Notes

  • Android rejects overflow using an input filter and emits onMaxLengthExceeded
  • iOS rejects overflow inside shouldChangeTextInRange and emits onMaxLengthExceeded
  • JS exposes both maxLength and onMaxLengthExceeded

Validation

  • verified app-side integration against a local package copy in a consumer app
  • linted the consumer integration file and the native bridge entry updates locally

@xiamu14 xiamu14 marked this pull request as ready for review April 9, 2026 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant