Skip to content

Commit

Permalink
add textInput refs directly on useImperativeHandle (#650)
Browse files Browse the repository at this point in the history
  • Loading branch information
bell-steven committed Nov 9, 2020
1 parent 3c2c357 commit dbdb653
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion GooglePlacesAutocomplete.js
Expand Up @@ -147,7 +147,10 @@ export const GooglePlacesAutocomplete = forwardRef((props, ref) => {
setStateText(address);
},
getAddressText: () => stateText,
...inputRef.current,
blur: () => inputRef.current.blur(),
focus: () => inputRef.current.focus(),
isFocused: () => inputRef.current.isFocused(),
clear: () => inputRef.current.clear(),
}));

const requestShouldUseWithCredentials = () =>
Expand Down

0 comments on commit dbdb653

Please sign in to comment.