Clear category param when typing new search

This commit is contained in:
2026-03-20 17:42:36 +04:00
parent b39d92b7c4
commit db6478e353
2 changed files with 3 additions and 2 deletions

View File

@@ -84,7 +84,7 @@ export default class SearchBoxComponent extends Component {
event.preventDefault();
if (!this.query) return;
let queryParams = { q: this.query, selected: null };
let queryParams = { q: this.query, selected: null, category: null };
if (this.mapUi.currentCenter) {
const { lat, lon } = this.mapUi.currentCenter;
@@ -116,6 +116,7 @@ export default class SearchBoxComponent extends Component {
lat: place.lat,
lon: place.lon,
selected: null,
category: null,
},
});
}

View File

@@ -100,7 +100,7 @@ module('Integration | Component | search-box', function (hooks) {
.dispatchEvent(new Event('submit', { bubbles: true, cancelable: true }));
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"}}',
]);
});