File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,7 +45,6 @@ export default function AddressInput(props: AddressInputProps) {
4545 // container for geocoding results which gets set by the geocoder class and set to empty if the underlying query
4646 // point gets changed from outside also gets filled with an item to select the current location as input if input
4747 // has focus and geocoding results are empty
48- const [ origAutocompleteItems , setOrigAutocompleteItems ] = useState < AutocompleteItem [ ] > ( [ ] )
4948 const [ autocompleteItems , setAutocompleteItems ] = useState < AutocompleteItem [ ] > ( [ ] )
5049 const [ geocoder ] = useState (
5150 new Geocoder ( getApi ( ) , ( query , provider , hits ) => {
@@ -209,12 +208,10 @@ export default function AddressInput(props: AddressInputProps) {
209208 onFocus = { ( ) => {
210209 setHasFocus ( true )
211210 props . clearDragDrop ( )
212- if ( origAutocompleteItems . length > 0 ) setAutocompleteItems ( origAutocompleteItems )
213211 } }
214212 onBlur = { ( ) => {
215213 setHasFocus ( false )
216214 geocoder . cancel ( )
217- setOrigAutocompleteItems ( autocompleteItems )
218215 setAutocompleteItems ( [ ] )
219216 } }
220217 value = { text }
You can’t perform that action at this time.
0 commit comments