From a2ddca69e0670cf1badf44c3b877413fe9ef986d Mon Sep 17 00:00:00 2001 From: Phil Eaton Date: Sun, 6 Feb 2022 14:02:29 -0500 Subject: [PATCH] No input sync on project create view (#171) --- ui/MakeSelectProject.tsx | 1 + ui/components/Input.tsx | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/MakeSelectProject.tsx b/ui/MakeSelectProject.tsx index eb74d9dbf..73a07f203 100644 --- a/ui/MakeSelectProject.tsx +++ b/ui/MakeSelectProject.tsx @@ -69,6 +69,7 @@ export function MakeSelectProject() {

Pick a name for this project to get started.

setProjectNameTmp(v)} diff --git a/ui/components/Input.tsx b/ui/components/Input.tsx index 96d7f8699..116afbb45 100644 --- a/ui/components/Input.tsx +++ b/ui/components/Input.tsx @@ -60,6 +60,7 @@ export interface InputProps defaultValue?: string; tooltip?: React.ReactNode; invalid?: React.ReactNode; + noDelay?: boolean; } export function Input({ @@ -70,6 +71,7 @@ export function Input({ label, autoWidth, type, + noDelay, defaultValue, tooltip, ...props @@ -79,7 +81,7 @@ export function Input({ const [localValue, setLocalValue, flushLocalValue] = useDebouncedLocalState( value, onChange, - type !== 'checkbox' && type !== 'radio', + type !== 'checkbox' && type !== 'radio' && !noDelay, INPUT_SYNC_PERIOD, defaultValue );