Skip to content

Commit

Permalink
Fix ts issues
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-debruijn committed Nov 22, 2024
1 parent 2e3bdd0 commit ea99c39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pages/CityPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -20,7 +20,7 @@ type Props = Omit<StackProps, 'onChange'> & {
error?: string;
};

const CityPicker = forwardRef<HTMLInputElement, Props>(
const CityPicker = forwardRef<TypeaheadElement<City>, Props>(
(
{ offerId, country, name, value, onChange, onBlur, error, ...props },
ref,
Expand Down
4 changes: 2 additions & 2 deletions src/ui/Typeahead.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -86,7 +86,7 @@ const TypeaheadInner = <T extends TypeaheadModel>(
disabled={disabled}
className={className}
flex={1}
ref={ref}
ref={ref as unknown as Ref<HTMLElement>}
css={`
input[type='time']::-webkit-calendar-picker-indicator {
display: none;
Expand Down

0 comments on commit ea99c39

Please sign in to comment.