FaridSafi / react-native-google-places-autocomplete

Customizable Google Places autocomplete component for iOS and Android React-Native apps
MIT License
2.01k stars 852 forks source link

Event object not send in `onBlur` method #839

Open tonibardina opened 2 years ago

tonibardina commented 2 years ago

Issue

Not receiving event object when sending onBlur in textInputProps

Description

I am trying to get the event object from the onBlur method but I'm not getting it. Reviewing the code I have seen it is not sent. I

onBlur={
              onBlur
                ? (e) => {
                    _onBlur(e);
                    onBlur(); // <- Here 
                  }
                : _onBlur
            }

Is there any specific reason for that?

Reproduction

Add onBlur to textInputProps and log the arguments received (no arguments are sent)

tonibardina commented 2 years ago

btw I have created a PR in case you want to add it -> https://github.com/FaridSafi/react-native-google-places-autocomplete/pull/840