Fix questions: applicable mappings are now calculated dynamically; charging station theme now only shows applicable plugs based on the allowed vehicle types

This commit is contained in:
Pieter Vander Vennet 2021-10-02 15:16:41 +02:00
parent bedc576313
commit df34239256
14 changed files with 3677 additions and 3359 deletions

View file

@ -11,11 +11,15 @@ export class FixedInputElement<T> extends InputElement<T> {
private readonly _el: HTMLElement;
constructor(rendering: BaseUIElement | string,
value: T,
value: T | UIEventSource<T>,
comparator: ((t0: T, t1: T) => boolean) = undefined) {
super();
this._comparator = comparator ?? ((t0, t1) => t0 == t1);
this.value = new UIEventSource<T>(value);
if(value instanceof UIEventSource){
this.value = value
}else{
this.value = new UIEventSource<T>(value);
}
const selected = this.IsSelected;
this._el = document.createElement("span")