Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: fabOnReact/react-native-notes
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: fabOnReact/react-native-notes
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: text-input-errors-build
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 16 commits
  • 7 files changed
  • 1 contributor

Commits on Mar 16, 2022

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

Commits on Mar 18, 2022

  1. Configuration menu
    Copy the full SHA
    a3b9dc2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    98e4284 View commit details
    Browse the repository at this point in the history
  3. restore original example

    fabOnReact committed Mar 18, 2022
    Configuration menu
    Copy the full SHA
    d04869a View commit details
    Browse the repository at this point in the history
  4. update example

    fabOnReact committed Mar 18, 2022
    Configuration menu
    Copy the full SHA
    b0aa709 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5f06b2a View commit details
    Browse the repository at this point in the history
  6. Error onBlur example

    fabOnReact committed Mar 18, 2022
    Configuration menu
    Copy the full SHA
    9cc7331 View commit details
    Browse the repository at this point in the history
  7. draft examples

    fabOnReact committed Mar 18, 2022
    Configuration menu
    Copy the full SHA
    089d575 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    fa21d97 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3b7581c View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2022

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

Commits on Mar 23, 2022

  1. add errorMessage to ReactTextUpdate and maybeSetErrorMessage

    allow to display error message on TextInput triggered in a onChangeText
    callback. Fixes issue explained in:
    #12 (comment)
    
    Related links:
    #12 (comment)
    fabOnReact/react-native@d3d54e1
    fabOnReact committed Mar 23, 2022
    Configuration menu
    Copy the full SHA
    012d92d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    15810e9 View commit details
    Browse the repository at this point in the history
  3. rename android_errorMessage to errorMessageAndroid

    Following same implementation used with underlineColorAndroid
    https://github.com/fabriziobertoglio1987/react-native/blob/15810e96d90e18dbd424666338fdec0127d403ed/Libraries/Components/TextInput/TextInput.js#L470
    https://github.com/fabriziobertoglio1987/react-native/blob/15810e96d90e18dbd424666338fdec0127d403ed/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js#L203
    
    While with other components (for example prop android_ripple), we use
    the android_ prefix to denote platform specific props.
    facebook/react-native#29157 (comment)
    https://github.com/fabriziobertoglio1987/react-native/blob/15810e96d90e18dbd424666338fdec0127d403ed/Libraries/Components/Pressable/Pressable.js#L177
    
    In the case of TextInput we already have Platform Logic that detects
    Android/iOS platform.
    https://github.com/fabriziobertoglio1987/react-native/blob/15810e96d90e18dbd424666338fdec0127d403ed/Libraries/Components/TextInput/TextInput.js#L1268
    
    For this reason TextInput component does not use android_ props and
    instead uses this naming convention underlineColorAndroid.
    
    To be noted that the prop underlineColorAndroid is passed to both iOS
    and Android version, while other props have platform specific logic for
    android and iOS.
    https://github.com/fabriziobertoglio1987/react-native/blob/15810e96d90e18dbd424666338fdec0127d403ed/Libraries/Components/TextInput/TextInput.js#L1334
    https://github.com/fabriziobertoglio1987/react-native/blob/15810e96d90e18dbd424666338fdec0127d403ed/Libraries/Components/TextInput/TextInput.js#L1293
    
    Example of a prop that have a specific value on Android and is different
    from iOS
    https://github.com/fabriziobertoglio1987/react-native/blob/15810e96d90e18dbd424666338fdec0127d403ed/Libraries/Components/TextInput/TextInput.js#L1271
    
    I decided to follow the same solution used in underlineColorAndroid.
    fabOnReact committed Mar 23, 2022
    Configuration menu
    Copy the full SHA
    cad239b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    aa53df1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b578637 View commit details
    Browse the repository at this point in the history
Loading