chore: reworking the types a little bit here to get them to work with the new version

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2021-09-13 10:15:35 +02:00
parent 36bc77c709
commit 1c6dff7501
@@ -25,7 +25,7 @@ type Props<TFieldValue extends string> = {
options: string[];
required?: boolean;
errors?: FieldErrors<Record<TFieldValue, string>>;
errors?: FieldErrors;
rules?: React.ComponentProps<typeof Controller>['rules'];
loading?: boolean;
@@ -37,7 +37,7 @@ type Props<TFieldValue extends string> = {
textFieldProps?: Omit<TextFieldProps, 'required' | 'fullWidth'>;
};
export const AutocompleteTextField = <TFieldValue extends string>({
export const AutocompleteTextField = <TFieldValue extends string = string>({
name,
options,
required,