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

[RNMobile] Resolve Text Entry Issues/Errors in Alt Text Settings #33975

Merged
merged 5 commits into from
Sep 3, 2021

Commits on Aug 10, 2021

  1. Resolve render error

    This commit aims to fix the render error outlined here: #33057 (review)
    
    The "outside" changes that happen when text is changed in the BottomSheetTextControl component should not be called directly from that component. Instead, they're now called within the useEffect hook.
    Siobhan committed Aug 10, 2021
    Configuration menu
    Copy the full SHA
    a6a013b View commit details
    Browse the repository at this point in the history
  2. Replace "value" prop with "defaultValue"

    The purpose of this commit is to address the text entry issues that currently exist for the TextInput component, as described here: facebook/react-native#30503
    
    A working workaround propose in that thread is to replace the "value" prop with "defaultValue".
    Siobhan committed Aug 10, 2021
    Configuration menu
    Copy the full SHA
    f6d9697 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2021

  1. Configuration menu
    Copy the full SHA
    01d0b7b View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2021

  1. Configuration menu
    Copy the full SHA
    42288e3 View commit details
    Browse the repository at this point in the history
  2. Simplify component by removing unecessary hooks

    The introduction of the "defaultValue" prop in f6d9697 means that it's no longer necessary to keep the value in state. "defaultValue" allows for text to be automatically changed as it's typed. See: https://reactnative.dev/docs/textinput#defaultvalue
    
    We don't need to use "onChangeText" for the purpose of updating the input's text and can instead use it to invoke the "onChange" function.
    
    We can also remove the useState and useEffect hooks, as they're not necessary to update the component's value.
    Siobhan committed Aug 30, 2021
    Configuration menu
    Copy the full SHA
    ccbef5c View commit details
    Browse the repository at this point in the history