From ea99c392d32e09267df4edb585b669f0852fa8c6 Mon Sep 17 00:00:00 2001 From: simon-debruijn Date: Fri, 22 Nov 2024 15:36:45 +0100 Subject: [PATCH] Fix ts issues --- src/pages/CityPicker.tsx | 4 ++-- src/ui/Typeahead.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/CityPicker.tsx b/src/pages/CityPicker.tsx index 6f522f0cc..432c0957c 100644 --- a/src/pages/CityPicker.tsx +++ b/src/pages/CityPicker.tsx @@ -6,7 +6,7 @@ import { City, useGetCitiesByQuery } from '@/hooks/api/cities'; import { Countries, Country } from '@/types/Country'; import { FormElement } from '@/ui/FormElement'; import { getStackProps, Stack, StackProps } from '@/ui/Stack'; -import { Typeahead } from '@/ui/Typeahead'; +import { Typeahead, TypeaheadElement } from '@/ui/Typeahead'; import { valueToArray } from '@/utils/valueToArray'; import { SupportedLanguages } from '../i18n'; @@ -20,7 +20,7 @@ type Props = Omit & { error?: string; }; -const CityPicker = forwardRef( +const CityPicker = forwardRef, Props>( ( { offerId, country, name, value, onChange, onBlur, error, ...props }, ref, diff --git a/src/ui/Typeahead.tsx b/src/ui/Typeahead.tsx index 2506e8f06..aa58692f3 100644 --- a/src/ui/Typeahead.tsx +++ b/src/ui/Typeahead.tsx @@ -1,6 +1,6 @@ import 'react-bootstrap-typeahead/css/Typeahead.css'; -import type { ForwardedRef } from 'react'; +import type { ForwardedRef, Ref } from 'react'; import { forwardRef } from 'react'; import type { TypeaheadModel } from 'react-bootstrap-typeahead'; import { AsyncTypeahead as BootstrapTypeahead } from 'react-bootstrap-typeahead'; @@ -86,7 +86,7 @@ const TypeaheadInner = ( disabled={disabled} className={className} flex={1} - ref={ref} + ref={ref as unknown as Ref} css={` input[type='time']::-webkit-calendar-picker-indicator { display: none;