forked from MapComplete/MapComplete
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:
parent
bedc576313
commit
df34239256
14 changed files with 3677 additions and 3359 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue