From 0167a92d80f09310524e173e9e5b536cc70b6cbb Mon Sep 17 00:00:00 2001
From: makuwa8992 <653524123@qq.com>
Date: Fri, 29 Dec 2023 18:01:43 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E7=BB=93=E6=9E=9C=E8=A1=A8?=
=?UTF-8?q?=E6=A0=BC=E4=B8=AD=E7=9A=84=E8=BE=93=E5=85=A5=E6=A1=86,?=
=?UTF-8?q?=E7=8E=B0=E5=9C=A8=E5=A4=B1=E7=84=A6=E6=88=96=E6=8C=89=E4=B8=8B?=
=?UTF-8?q?=E5=9B=9E=E8=BD=A6=E5=90=8Eneed=5Flist=E6=89=8D=E4=BC=9A?=
=?UTF-8?q?=E5=8F=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/auto_sized_input.jsx | 25 +++++++++++++++++++++++++
src/result.jsx | 6 +++---
src/scheme_data.jsx | 8 --------
3 files changed, 28 insertions(+), 11 deletions(-)
diff --git a/src/auto_sized_input.jsx b/src/auto_sized_input.jsx
index 803465d..1244417 100644
--- a/src/auto_sized_input.jsx
+++ b/src/auto_sized_input.jsx
@@ -1,3 +1,5 @@
+import React from 'react';
+import { useRef, useState } from 'react';
const input_style = {
padding: 0,
margin: 0,
@@ -30,6 +32,29 @@ const template_style = {
paddingRight: '6px',
}
+const DelayedInput_style = {
+ ...input_style,
+ position: 'relative',
+ width: '80%',
+ minWidth: '80px',
+ margin: 5,
+}
+
+export const DelayedInput = ({ value, onChange }) => {
+ const [displayedValue, setValue] = useState(null);
+ return (
+ {
+ onChange(e.target.value);
+ setv(null);
+ }}
+ onChange={e => setValue(e.target.value)}
+ onKeyDown={e => { if (e.key == "Enter") onChange(e.target.value); }}
+ />
+ );
+}
export const AutoSizedInput = ({ value, onChange }) => {
return (