File tree Expand file tree Collapse file tree
frontend/src/lib/components/Input Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export type InputProps = InputUnstyledProps & {
1414 onValueChange ?: ( value : string ) => void ;
1515} ;
1616
17- export const Input = React . forwardRef ( ( props : InputProps , ref : React . ForwardedRef < HTMLInputElement > ) => {
17+ export const Input = React . forwardRef ( ( props : InputProps , ref : React . ForwardedRef < HTMLDivElement > ) => {
1818 const {
1919 startAdornment,
2020 endAdornment,
@@ -53,7 +53,6 @@ export const Input = React.forwardRef((props: InputProps, ref: React.ForwardedRe
5353 const handleAdornmentClick = React . useCallback ( ( event : React . MouseEvent < HTMLDivElement , MouseEvent > ) => {
5454 if ( internalRef . current ) {
5555 internalRef . current . focus ( ) ;
56- internalRef . current . getElementsByTagName ( "input" ) [ 0 ] . focus ( ) ;
5756 }
5857 event . stopPropagation ( ) ;
5958 } , [ ] ) ;
@@ -167,7 +166,6 @@ export const Input = React.forwardRef((props: InputProps, ref: React.ForwardedRe
167166 onChange = { handleInputChange }
168167 onBlur = { handleInputEditingDone }
169168 onKeyUp = { handleKeyUp }
170- ref = { internalRef }
171169 slotProps = { {
172170 root : {
173171 className : "grow" ,
@@ -176,6 +174,7 @@ export const Input = React.forwardRef((props: InputProps, ref: React.ForwardedRe
176174 className : resolveClassNames (
177175 "h-full focus:border-indigo-500 block w-full sm:text-sm border-gray-300 outline-none"
178176 ) ,
177+ ref : internalRef ,
179178 } ,
180179 } }
181180 />
You can’t perform that action at this time.
0 commit comments