From b2c0adec68b1574a2b737e19cddfd6d323cc91b3 Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Tue, 27 Aug 2024 14:01:17 -0500 Subject: [PATCH] Make Select work how one would expect in forms --- .dist/settings.js | 4 ++++ webpage/settings.ts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.dist/settings.js b/.dist/settings.js index ed94ffe..ed36a36 100644 --- a/.dist/settings.js +++ b/.dist/settings.js @@ -793,6 +793,10 @@ class Form { if (thing === "") continue; const input = this.names.get(thing); + if (input instanceof SelectInput) { + build[thing] = input.options[input.value]; + continue; + } build[thing] = input.value; } if (this.fetchURL !== "") { diff --git a/webpage/settings.ts b/webpage/settings.ts index d59f5d7..7f98425 100644 --- a/webpage/settings.ts +++ b/webpage/settings.ts @@ -794,6 +794,10 @@ class Form implements OptionsElement{ for(const thing of this.names.keys()){ if(thing==="") continue; const input=this.names.get(thing) as OptionsElement; + if(input instanceof SelectInput){ + build[thing]=input.options[input.value]; + continue; + } build[thing]=input.value; } if(this.fetchURL!==""){