File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
frontend/src/lib/components/Input Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export type InputProps = InputUnstyledProps & {
14
14
onValueChange ?: ( value : string ) => void ;
15
15
} ;
16
16
17
- export const Input = React . forwardRef ( ( props : InputProps , ref : React . ForwardedRef < HTMLInputElement > ) => {
17
+ export const Input = React . forwardRef ( ( props : InputProps , ref : React . ForwardedRef < HTMLDivElement > ) => {
18
18
const {
19
19
startAdornment,
20
20
endAdornment,
@@ -53,7 +53,6 @@ export const Input = React.forwardRef((props: InputProps, ref: React.ForwardedRe
53
53
const handleAdornmentClick = React . useCallback ( ( event : React . MouseEvent < HTMLDivElement , MouseEvent > ) => {
54
54
if ( internalRef . current ) {
55
55
internalRef . current . focus ( ) ;
56
- internalRef . current . getElementsByTagName ( "input" ) [ 0 ] . focus ( ) ;
57
56
}
58
57
event . stopPropagation ( ) ;
59
58
} , [ ] ) ;
@@ -167,7 +166,6 @@ export const Input = React.forwardRef((props: InputProps, ref: React.ForwardedRe
167
166
onChange = { handleInputChange }
168
167
onBlur = { handleInputEditingDone }
169
168
onKeyUp = { handleKeyUp }
170
- ref = { internalRef }
171
169
slotProps = { {
172
170
root : {
173
171
className : "grow" ,
@@ -176,6 +174,7 @@ export const Input = React.forwardRef((props: InputProps, ref: React.ForwardedRe
176
174
className : resolveClassNames (
177
175
"h-full focus:border-indigo-500 block w-full sm:text-sm border-gray-300 outline-none"
178
176
) ,
177
+ ref : internalRef ,
179
178
} ,
180
179
} }
181
180
/>
You can’t perform that action at this time.
0 commit comments