Skip to content

Commit ea99c39

Browse files
Fix ts issues
1 parent 2e3bdd0 commit ea99c39

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/pages/CityPicker.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { City, useGetCitiesByQuery } from '@/hooks/api/cities';
66
import { Countries, Country } from '@/types/Country';
77
import { FormElement } from '@/ui/FormElement';
88
import { getStackProps, Stack, StackProps } from '@/ui/Stack';
9-
import { Typeahead } from '@/ui/Typeahead';
9+
import { Typeahead, TypeaheadElement } from '@/ui/Typeahead';
1010
import { valueToArray } from '@/utils/valueToArray';
1111

1212
import { SupportedLanguages } from '../i18n';
@@ -20,7 +20,7 @@ type Props = Omit<StackProps, 'onChange'> & {
2020
error?: string;
2121
};
2222

23-
const CityPicker = forwardRef<HTMLInputElement, Props>(
23+
const CityPicker = forwardRef<TypeaheadElement<City>, Props>(
2424
(
2525
{ offerId, country, name, value, onChange, onBlur, error, ...props },
2626
ref,

src/ui/Typeahead.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import 'react-bootstrap-typeahead/css/Typeahead.css';
22

3-
import type { ForwardedRef } from 'react';
3+
import type { ForwardedRef, Ref } from 'react';
44
import { forwardRef } from 'react';
55
import type { TypeaheadModel } from 'react-bootstrap-typeahead';
66
import { AsyncTypeahead as BootstrapTypeahead } from 'react-bootstrap-typeahead';
@@ -86,7 +86,7 @@ const TypeaheadInner = <T extends TypeaheadModel>(
8686
disabled={disabled}
8787
className={className}
8888
flex={1}
89-
ref={ref}
89+
ref={ref as unknown as Ref<HTMLElement>}
9090
css={`
9191
input[type='time']::-webkit-calendar-picker-indicator {
9292
display: none;

0 commit comments

Comments
 (0)