From 68887d65a7c8049ba39dd6b0c8d1ab451d931a75 Mon Sep 17 00:00:00 2001 From: glax Date: Sat, 19 Oct 2024 20:50:14 +0200 Subject: [PATCH] Make searchbox size adjust to length --- Website/modules/Search.tsx | 1 + Website/styles/search.css | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Website/modules/Search.tsx b/Website/modules/Search.tsx index 253ed21..5ade055 100644 --- a/Website/modules/Search.tsx +++ b/Website/modules/Search.tsx @@ -36,6 +36,7 @@ export default function Search({onJobsChanged} : {onJobsChanged: EventHandler = (event) => { + event.currentTarget.style.width = event.target.value.length + "ch"; if(mangaConnectors === undefined) return; var str : string = event.target.value; diff --git a/Website/styles/search.css b/Website/styles/search.css index dda4f20..f70aa90 100644 --- a/Website/styles/search.css +++ b/Website/styles/search.css @@ -24,7 +24,8 @@ border-bottom-left-radius: 2px; border-top-left-radius: 2px; border-left-width: 2px !important; - width: 300px; + min-width: 300px; + max-width: 50vw; } #Searchbox-connector {