diff --git a/src/UI/InputElement/InputHelpers.ts b/src/UI/InputElement/InputHelpers.ts index 8c0fe1785..0e7099235 100644 --- a/src/UI/InputElement/InputHelpers.ts +++ b/src/UI/InputElement/InputHelpers.ts @@ -69,11 +69,10 @@ export default class InputHelpers { ) { const inputHelperOptions = props const args = inputHelperOptions.args ?? [] - const searchKey = args[0] ?? "name" + const searchKey: string = args[0] ?? "name" - const searchFor = ( - (inputHelperOptions.feature?.properties[searchKey]?.toLowerCase() ?? "") - ) + const searchFor: string = searchKey.split(";").map(k => inputHelperOptions.feature?.properties[k]?.toLowerCase()) + .find(foundValue => !!foundValue) ?? "" let searchForValue: UIEventSource = new UIEventSource(searchFor) const options: any = args[1] diff --git a/src/UI/Popup/TagRendering/FreeformInput.svelte b/src/UI/Popup/TagRendering/FreeformInput.svelte index 42aa3ecff..e0c85b22d 100644 --- a/src/UI/Popup/TagRendering/FreeformInput.svelte +++ b/src/UI/Popup/TagRendering/FreeformInput.svelte @@ -76,6 +76,5 @@ {value} {state} on:submit - {unvalidatedText} /> diff --git a/src/UI/Wikipedia/WikidataSearchBox.ts b/src/UI/Wikipedia/WikidataSearchBox.ts index 48197e856..a2728bab9 100644 --- a/src/UI/Wikipedia/WikidataSearchBox.ts +++ b/src/UI/Wikipedia/WikidataSearchBox.ts @@ -20,7 +20,7 @@ export default class WikidataSearchBox extends InputElement { new Table( ["name", "doc"], [ - ["key", "the value of this tag will initialize search (default: name)"], + ["key", "the value of this tag will initialize search (default: name). This can be a ';'-separated list in which case every key will be inspected. The non-null value will be used as search"], [ "options", new Combine([