Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: include information about text range changes in onChange #45248

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

hannojg
Copy link
Contributor

@hannojg hannojg commented Jul 2, 2024

Summary:

This Pr provides a solution to:

By providing further information about the range in which a text has been changed in the onChange event users are able to implement <TextInputs /> that only apply partial text updates, thus avoiding race condition issues between the main/UI and JS thread.

Changelog:

[ANDROID] [ADDED] - Add start, before, count info to the Textinput's onChange event
[IOS] [ADDED] - Add start, before, count info to the Textinput's onChange event

Test Plan:

I added an example to the rn-tester app.

Screen.Recording.2024-07-02.at.15.33.29.mov
@analysis-bot
Copy link

analysis-bot commented Jul 2, 2024

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 20,300,899 +337
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 23,497,495 +121
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: c252460
Branch: main

@hannojg hannojg force-pushed the feat/native-text-range-updates branch 3 times, most recently from e26ce7a to ffb06f8 Compare July 2, 2024 14:24
@hannojg hannojg force-pushed the feat/native-text-range-updates branch from ffb06f8 to 5bcdda8 Compare July 2, 2024 14:42
@hannojg hannojg marked this pull request as ready for review July 2, 2024 14:45
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jul 2, 2024
hannojg added a commit to margelo/react-native-live-markdown that referenced this pull request Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
3 participants