Clear category param when typing new search
This commit is contained in:
@@ -84,7 +84,7 @@ export default class SearchBoxComponent extends Component {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (!this.query) return;
|
if (!this.query) return;
|
||||||
|
|
||||||
let queryParams = { q: this.query, selected: null };
|
let queryParams = { q: this.query, selected: null, category: null };
|
||||||
|
|
||||||
if (this.mapUi.currentCenter) {
|
if (this.mapUi.currentCenter) {
|
||||||
const { lat, lon } = this.mapUi.currentCenter;
|
const { lat, lon } = this.mapUi.currentCenter;
|
||||||
@@ -116,6 +116,7 @@ export default class SearchBoxComponent extends Component {
|
|||||||
lat: place.lat,
|
lat: place.lat,
|
||||||
lon: place.lon,
|
lon: place.lon,
|
||||||
selected: null,
|
selected: null,
|
||||||
|
category: null,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ module('Integration | Component | search-box', function (hooks) {
|
|||||||
.dispatchEvent(new Event('submit', { bubbles: true, cancelable: true }));
|
.dispatchEvent(new Event('submit', { bubbles: true, cancelable: true }));
|
||||||
|
|
||||||
assert.verifySteps([
|
assert.verifySteps([
|
||||||
'transitionTo: search {"queryParams":{"q":"berlin","selected":null,"lat":"52.5200","lon":"13.4050"}}',
|
'transitionTo: search {"queryParams":{"q":"berlin","selected":null,"category":null,"lat":"52.5200","lon":"13.4050"}}',
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user