Skip to content

Commit

Permalink
update ref to be an input element
Browse files Browse the repository at this point in the history
  • Loading branch information
steppy452 committed Apr 24, 2024
1 parent 575dae0 commit 843bfcb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/form/Input/InlineInput/InlineInput.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { FC, forwardRef, RefObject, InputHTMLAttributes } from 'react';
import { FC, forwardRef, Ref, InputHTMLAttributes } from 'react';
import AutosizeInput from 'react-18-input-autosize';
import { InputRef } from '../Input';
import { twMerge } from 'tailwind-merge';
import { InputTheme } from '../InputTheme';
import { useComponentTheme } from '../../../utils';
Expand Down Expand Up @@ -46,13 +45,13 @@ export const InlineInput: FC<InlineInputProps> = forwardRef(
theme: customTheme,
...rest
},
ref: RefObject<InputRef>
ref: Ref<HTMLInputElement>
) => {
const theme: InputTheme = useComponentTheme('input', customTheme);

return (
<AutosizeInput
inputRef={ref?.current?.inputRef}
inputRef={ref}
inputClassName={twMerge(theme.inline, inputClassName)}
placeholderIsMinWidth={placeholderIsMinWidth}
{...rest}
Expand Down

0 comments on commit 843bfcb

Please sign in to comment.