Merge master

This commit is contained in:
Pieter Vander Vennet 2023-12-03 02:51:43 +01:00
commit 7680c2791b
168 changed files with 23929 additions and 1012 deletions

View file

@ -1,26 +1,25 @@
<script lang="ts">
import { UIEventSource } from "../../Logic/UIEventSource.js";
import { UIEventSource } from "../../Logic/UIEventSource.js"
export let value: UIEventSource<any>
let i: any = value.data
let htmlElement : HTMLSelectElement
function selectAppropriateValue(){
if(!htmlElement){
return;
let htmlElement: HTMLSelectElement
function selectAppropriateValue() {
if (!htmlElement) {
return
}
const v = value.data
for (let option of htmlElement.getElementsByTagName("option")) {
if(option.value === v){
if (option.value === v) {
option.selected = true
return
}
}
}
value.addCallbackD(() => selectAppropriateValue())
$: {
if(htmlElement){
if (htmlElement) {
selectAppropriateValue()
}
}