Skip to content

Commit 0f033c2

Browse files
authored
Merge pull request #19 from phazei/patch-1
Update value in input box when value changes
2 parents abde927 + cccc414 commit 0f033c2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/GooglePlacesTextInput.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ const GooglePlacesTextInput = forwardRef<
179179
};
180180
}, []);
181181

182+
useEffect(() => {
183+
setInputText(value ?? '');
184+
}, [value]);
185+
182186
// Add keyboard listener
183187
useEffect(() => {
184188
if (hideOnKeyboardDismiss) {

0 commit comments

Comments
 (0)