Skip to content

Commit 402b556

Browse files
abhinavk96mariobehling
authored andcommitted
feat: Populate searchableLocationName with event location: (#3150)
1 parent 88fd06c commit 402b556

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

app/components/widgets/forms/location-input.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,17 @@ export default Component.extend({
1717
return values(this.address).join(' ').trim();
1818
}),
1919

20-
placeNameChanger: observer('combinedAddress', function() {
21-
this.set('placeName', this.combinedAddress);
20+
searchableAddress: computed('address.{city}', function() {
21+
return this.address.city;
22+
}),
23+
24+
placeNameChanger: observer('combinedAddress', 'searchableAddress', function() {
25+
this.setProperties(
26+
{ 'placeName' : this.combinedAddress,
27+
'searchableName' : this.searchableAddress
28+
}
29+
);
30+
2231
}),
2332

2433
actions: {

app/templates/components/forms/wizard/basic-details-step.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
lat=data.event.latitude
1111
lng=data.event.longitude
1212
placeName=data.event.locationName
13+
searchableName=data.event.searchableLocationName
1314
zoom=15
1415
placeholder=(t 'Location is required to make this event live')}}
1516
<div class="inline field">

0 commit comments

Comments
 (0)