@@ -4,7 +4,7 @@ import { useAppTranslation } from "@/i18n/TranslationContext"
44import { useDebounce } from "react-use"
55
66interface SeedControlProps {
7- value : number | string | undefined | null
7+ value : number | string | undefined | null
88 onChange : ( value : number | string | undefined | null ) => void
99}
1010
@@ -24,8 +24,8 @@ export const SeedControl = ({ value, onChange }: SeedControlProps) => {
2424 }
2525 }
2626 } ,
27- 50 ,
28- [ onChange , inputValue ]
27+ 50 ,
28+ [ onChange , inputValue ] ,
2929 )
3030
3131 // Sync internal state with prop changes when switching profiles.
@@ -40,7 +40,7 @@ export const SeedControl = ({ value, onChange }: SeedControlProps) => {
4040 setIsCustomSeed ( isChecked )
4141
4242 if ( ! isChecked ) {
43- setInputValue ( "" )
43+ setInputValue ( "" )
4444 } else {
4545 setInputValue ( value ?. toString ( ) ?? "" )
4646 }
@@ -55,26 +55,27 @@ export const SeedControl = ({ value, onChange }: SeedControlProps) => {
5555 < div >
5656 < VSCodeCheckbox
5757 checked = { isCustomSeed }
58- onChange = { handleCheckboxChange } >
58+ onChange = { ( e ) => {
59+ handleCheckboxChange ( e as React . ChangeEvent < HTMLInputElement > )
60+ } } >
5961 < label className = "block font-medium mb-1" > { t ( "settings:seed.useCustom" ) } </ label >
6062 </ VSCodeCheckbox >
61- < div className = "text-sm text-vscode-descriptionForeground mt-1" >
62- { t ( "settings:seed.description" ) }
63- </ div >
63+ < div className = "text-sm text-vscode-descriptionForeground mt-1" > { t ( "settings:seed.description" ) } </ div >
6464 </ div >
6565
6666 { isCustomSeed && (
6767 < div className = "flex flex-col gap-3 pl-3 border-l-2 border-vscode-button-background" >
6868 < div >
6969 < VSCodeTextField
70- type = "text"
70+ type = "text"
71+ inputMode = "numeric"
7172 value = { inputValue }
72- onInput = { handleInputChange }
73+ onInput = { ( e ) => {
74+ handleInputChange ( e as React . ChangeEvent < HTMLInputElement > )
75+ } }
7376 className = "w-full"
7477 />
75- < div className = "text-vscode-descriptionForeground text-sm mt-1" >
76- { t ( "settings:seed.label" ) }
77- </ div >
78+ < div className = "text-vscode-descriptionForeground text-sm mt-1" > { t ( "settings:seed.label" ) } </ div >
7879 </ div >
7980 </ div >
8081 ) }
0 commit comments