From 2f510e9143859c98b8c4526e82158269ac961325 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Mon, 20 Jul 2020 20:06:00 +0200 Subject: [PATCH] Fix searchAndGo --- UI/SearchAndGo.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/UI/SearchAndGo.ts b/UI/SearchAndGo.ts index 1ddf995..918bdb3 100644 --- a/UI/SearchAndGo.ts +++ b/UI/SearchAndGo.ts @@ -4,13 +4,16 @@ import {UIEventSource} from "./UIEventSource"; import {FixedUiElement} from "./Base/FixedUiElement"; import {Geocoding} from "../Logic/Geocoding"; import {Basemap} from "../Logic/Basemap"; +import {VariableUiElement} from "./Base/VariableUIElement"; export class SearchAndGo extends UIElement { private _placeholder = new UIEventSource("Zoek naar een locatie...") private _searchField = new TextField({ - placeholder: this._placeholder + placeholder: new VariableUiElement(this._placeholder), + fromString: str => str, + toString: str => str } ); @@ -61,7 +64,7 @@ export class SearchAndGo extends UIElement { } - protected InnerRender(): string { + InnerRender(): string { // "Search " + return this._searchField.Render() + this._goButton.Render();