Skip to content

Commit 5ee2f9a

Browse files
fix: update onChange type in PasswordInputField to match event structure
1 parent 0cfbb2d commit 5ee2f9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

webview-ui/src/components/ui/password-input.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
33

44
type PasswordInputFieldProps = {
55
value: string
6-
onChange: (value: string) => void
6+
onChange: (event: { target: { value: string } }) => void
77
placeholder?: string
88
label?: string
99
className?: string
@@ -31,7 +31,7 @@ export const PasswordInputField: React.FC<PasswordInputFieldProps> = ({
3131
<VSCodeTextField
3232
value={value}
3333
type={isPasswordVisible ? "text" : "password"}
34-
onInput={(e) => onChange((e.target as HTMLInputElement).value)}
34+
onInput={(e) => onChange({ target: { value: (e.target as HTMLInputElement).value } })}
3535
placeholder={placeholder}
3636
className={className}
3737
disabled={disabled}

0 commit comments

Comments
 (0)