Skip to content

Commit

Permalink
type issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsnes committed Jan 20, 2025
1 parent e673f51 commit ae91112
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react/src/components/Suggestion/Suggestion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import type { DefaultProps } from '../../types';
type SuggestionContextType = {
listId?: string;
setListId?: (id: string) => void;
inputRef?: React.RefObject<HTMLInputElement>;
inputRef?: React.RefObject<HTMLInputElement | null>;
};

export const SuggestionContext = createContext<SuggestionContextType>({});
Expand All @@ -24,7 +24,7 @@ export type SuggestionProps = DefaultProps &
export const Suggestion = forwardRef<HTMLDivElement, SuggestionProps>(
function Suggestion({ defaultValue, className, ...rest }, ref) {
const [listId, setListId] = useState(useId());
const inputRef = useRef<HTMLInputElement>(null);
const inputRef = useRef<HTMLInputElement | null>(null);

return (
<SuggestionContext.Provider value={{ inputRef, listId, setListId }}>
Expand Down

0 comments on commit ae91112

Please sign in to comment.