From 04cae65805fac8102246f57aa438fc054bc68174 Mon Sep 17 00:00:00 2001 From: kunish Date: Thu, 10 Oct 2024 23:49:42 +0800 Subject: [PATCH] feat(config): clear dns query results when input content gets cleared --- src/pages/Config.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pages/Config.tsx b/src/pages/Config.tsx index caacc69..05e988f 100644 --- a/src/pages/Config.tsx +++ b/src/pages/Config.tsx @@ -76,6 +76,9 @@ const DNSQueryForm = () => { name="name" class="input input-bordered min-w-0 flex-1" placeholder="google.com" + onInput={(e) => { + if (!e.target.value) setDNSQueryResult([]) + }} />