Skip to content

Commit cccc414

Browse files
authored
Update GooglePlacesTextInput.tsx
Update input on value change
1 parent abde927 commit cccc414

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)