if (searchAction !== 1 /* SearchAction.Navigation */) {
this.searchParameters = [];
new FormData(this.form).forEach((value, key) => {
- if (value.toString().trim()) {
- this.searchParameters.push([key, value.toString().trim()]);
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
+ const trimmed = value.toString().trim();
+ if (trimmed) {
+ this.searchParameters.push([key, trimmed]);
}
});
}
if (this.activePage > 1) {
parameters.push(["pageNo", this.activePage.toString()]);
}
- url.search += new URLSearchParams(parameters);
+ url.search += (new URLSearchParams(parameters)).toString();
if (searchAction === 2 /* SearchAction.Init */) {
window.history.replaceState({ searchAction }, document.title, url.toString());
}
getFormData() {
const data = {};
new FormData(this.form).forEach((value, key) => {
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
if (value.toString()) {
data[key] = value;
}