Omit built-in props overwritten on form controls (#27425)

Signed-off-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
Jon Koops 2024-03-01 16:24:58 +01:00 committed by GitHub
parent f970803738
commit 42dd203ae7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -21,7 +21,7 @@ export type NumberControlOption = {
export type NumberControlProps<
T extends FieldValues,
P extends FieldPath<T> = FieldPath<T>,
> = Omit<NumberInputProps, "name"> &
> = Omit<NumberInputProps, "name" | "isRequired" | "required"> &
UseControllerProps<T, P> & {
name: string;
label?: string;

View file

@ -12,7 +12,7 @@ import { FormLabel } from "./FormLabel";
export type SwitchControlProps<
T extends FieldValues,
P extends FieldPath<T> = FieldPath<T>,
> = SwitchProps &
> = Omit<SwitchProps, "name"> &
UseControllerProps<T, P> & {
name: string;
label?: string;

View file

@ -14,7 +14,7 @@ export type TextControlProps<
T extends FieldValues,
P extends FieldPath<T> = FieldPath<T>,
> = UseControllerProps<T, P> &
TextInputProps & {
Omit<TextInputProps, "name" | "isRequired" | "required"> & {
label: string;
labelIcon?: string;
isDisabled?: boolean;