Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4828

Ember Place Autocomplete not calling placeChangedCallback function

$
0
0

@yefan15 wrote:

I am running into the issue where when using ember place autocomplete search bar as a component it is not recognizing the placeChangedCallback function defined in the actions in my component. I am not sure what is going on.

Template:

<p id=“message”>Message: {{message}}</p>

<p>Full adddress from JSON sent to the callback: {{{fullAddress}}}</p>

<p>Clean string: {{cleanFullAddress}}</p>

<p> Model address: {{address}}</p>

<div id=“search-bar” data-google-auto="{{googleAuto}}">

<label class=“visually-hidden” for=“input-search”>Add a new address</label>

{{place-autocomplete-field

id=“input-search”

value= address

handlerController= this

placeholder=“Add a new address”

inputClass= ‘place-autocomplete–input’

placeChangedCallback= “addressChanged”

focusOutCallback=“done”

restrictions=googleMapsRestrictions

withGeoLocate= true

}}

<pre style=“font-size: 6px;”>

{{placeJSON}}

</pre>

Component:

googleMapsRestrictions: { country: ‘us’, }, fullAddress: null, googleAuto: null, action: { done(){ console.log(“Reached”); }, addressChanged(place) { console.log("***********"+place);

  }
}

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4828

Trending Articles