homeflowjs 0.12.7 → 0.12.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -109,7 +109,7 @@ const hfInitialize = () => {
109
109
  || pageRoute === 'counties#show'
110
110
  || pageRoute === 'postcodes#show'
111
111
  || pageRoute === 'locations#show'
112
- ) {
112
+ ) {
113
113
  const searchFromFragment = parseFragment(window.location.pathname);
114
114
  const defaultStatus = store.getState().app.themePreferences.default_search_status;
115
115
 
@@ -123,17 +123,18 @@ const hfInitialize = () => {
123
123
 
124
124
  store.dispatch(setInitialSearch(searchFromFragment));
125
125
  store.dispatch(setSearch(searchFromFragment));
126
- } else {
127
- if (defaultStatus && !search.status) store.dispatch(setSearchField({ status: defaultStatus }));
128
126
  }
129
127
 
130
128
  const place = Homeflow.get('place');
131
129
  if (place) {
130
+ const initialSearchSet = Object.keys(store.getState().search?.initialSearch)?.length;
132
131
  store.dispatch(setPlace(place));
133
- store.dispatch(setInitialSearch({
134
- q: place.name + (place.county_name ? `, ${place.county_name}` : ''),
135
- place,
136
- }));
132
+ if (!initialSearchSet) {
133
+ store.dispatch(setInitialSearch({
134
+ q: place.name + (place.county_name ? `, ${place.county_name}` : ''),
135
+ place,
136
+ }));
137
+ }
137
138
  }
138
139
  const expandedPolygon = Homeflow.get('expanded_polygon');
139
140
  if (expandedPolygon) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homeflowjs",
3
- "version": "0.12.7",
3
+ "version": "0.12.9",
4
4
  "sideEffects": [
5
5
  "modal/**/*",
6
6
  "properties/properties-map/**/*",
@@ -281,7 +281,7 @@ export default class DraggableMap {
281
281
  const layer = Homeflow.get('pin_clustering') ? this.clusteringMarkerLayer : this.nonClusteringMarkerLayer;
282
282
 
283
283
  if (property.property_id === null || property.lat === 0 || property.lng === 0) return;
284
- if (geonameId && Homeflow.get('breadcrumbs_map') && geonameId !== currentGeonameId()) return;
284
+ if (geonameId && Homeflow.get('breadcrumbs_map') && geonameId !== currentGeonameId() && !this.isDisplayProperties()) return;
285
285
 
286
286
  layer.addLayer(this.generateMarker(property));
287
287
  }
@@ -20,7 +20,11 @@ export default class DrawableMap extends DraggableMap {
20
20
  Homeflow.kickEvent('editbanner', this);
21
21
  Homeflow.kickEvent('deletebanner', this);
22
22
  this.repositionDrawControls();
23
- return this.onMapDrag();
23
+ // note: I'm not 100% sure this is will ever be required if super.init() is called
24
+ // something to review in homeflow_next
25
+ if (!Homeflow.get('breadcrumbs_map')) {
26
+ return this.onMapDrag();
27
+ }
24
28
  }
25
29
 
26
30
  onMapDrag() {
@@ -28,6 +28,7 @@ class SearchForm extends Component {
28
28
  }
29
29
  } else {
30
30
  if (defaultSort && !search.sorted) setSearchField({ sorted: defaultSort });
31
+ if (defaultStatus && !search.status) setSearchField({ status: defaultStatus });
31
32
  }
32
33
 
33
34
  if (defaultChannel) setSearchField({ channel: defaultChannel });