-
Notifications
You must be signed in to change notification settings - Fork 112
Open
Description
Hi all,
I am getting the error
places_impl.js:30 Uncaught TypeError: Cannot read property 'trim' of undefined
at V9 (places_impl.js:30)
at O9._.r.vm (places_impl.js:61)
`
AutocompleteType[] types = new AutocompleteType[1];
types[0] = AutocompleteType.LOCALITY;
AutocompleteOptions options = AutocompleteOptions.newInstance();
options.setTypes(types);
final Autocomplete autoComplete = Autocomplete.newInstance(
tb.getElement(), options);
autoComplete.addPlaceChangeHandler(new PlaceChangeMapHandler() {
public void onEvent(PlaceChangeMapEvent event) {
PlaceResult result = autoComplete.getPlace();
//result.getGeometry().getLocation().ge
tb.setValue(result.getName());
}
});
tb.addKeyDownHandler(new KeyDownHandler() {
@Override
public void onKeyDown(KeyDownEvent event) {
if(event.getNativeKeyCode() == KeyCodes.KEY_ENTER){
GWT.log("Blocking form submit for autocomplete text box");
event.preventDefault();
}
}
});`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels