Skip to content

Commit 1cad517

Browse files
Search on label only and show 10 results instead of 4
1 parent ac37ad2 commit 1cad517

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/js/search.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,9 @@ function initSearchPopup(): SearchPopupObservable {
4545

4646
export default function initSearch(filterManager: PlaceFilterManager): void {
4747
const places = Object.entries(filterManager.entries).map(
48-
([placeId, entry]) => ({
48+
([placeId]) => ({
4949
value: placeId,
5050
label: placeId,
51-
customProperties: {
52-
place: entry.place.name,
53-
state: entry.place.state ?? "",
54-
country: entry.place.country,
55-
},
5651
}),
5752
);
5853
const htmlElement = document.querySelector(".search");
@@ -66,10 +61,9 @@ export default function initSearch(filterManager: PlaceFilterManager): void {
6661
allowHTML: false,
6762
itemSelectText: "",
6863
searchEnabled: true,
64+
searchResultLimit: 10,
6965
searchFields: [
70-
"customProperties.place",
71-
"customProperties.state",
72-
"customProperties.country",
66+
"label",
7367
],
7468
});
7569

0 commit comments

Comments
 (0)