Skip to content

Commit

Permalink
No input sync on project create view (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
eatonphil committed Feb 6, 2022
1 parent 834dbd6 commit a2ddca6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions ui/MakeSelectProject.tsx
Expand Up @@ -69,6 +69,7 @@ export function MakeSelectProject() {
<p>Pick a name for this project to get started.</p>
<div className="form-row">
<Input
noDelay
value={projectNameTmp}
label="Project name"
onChange={(v) => setProjectNameTmp(v)}
Expand Down
4 changes: 3 additions & 1 deletion ui/components/Input.tsx
Expand Up @@ -60,6 +60,7 @@ export interface InputProps
defaultValue?: string;
tooltip?: React.ReactNode;
invalid?: React.ReactNode;
noDelay?: boolean;
}

export function Input({
Expand All @@ -70,6 +71,7 @@ export function Input({
label,
autoWidth,
type,
noDelay,
defaultValue,
tooltip,
...props
Expand All @@ -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
);
Expand Down

0 comments on commit a2ddca6

Please sign in to comment.