Skip to content

Commit 558c15e

Browse files
Merge remote-tracking branch 'upstream/main' into singleton-httpx-client
2 parents 327cf16 + cc1c4a1 commit 558c15e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

frontend/src/lib/components/Input/input.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff 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
/>

0 commit comments

Comments
 (0)