From 17c6722e28ce1d1195393f02e1776175dc22942d Mon Sep 17 00:00:00 2001 From: Justin Bennett Date: Wed, 15 Nov 2023 22:53:33 -0500 Subject: [PATCH] Ensure that TextField can't be of type number --- app/components/form/fields/TextField.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/components/form/fields/TextField.tsx b/app/components/form/fields/TextField.tsx index dc53ff6f3..a818fb8f7 100644 --- a/app/components/form/fields/TextField.tsx +++ b/app/components/form/fields/TextField.tsx @@ -6,7 +6,7 @@ * Copyright Oxide Computer Company */ import cn from 'classnames' -import { useId } from 'react' +import { useId, type HTMLInputTypeAttribute } from 'react' import { Controller, type Control, @@ -30,10 +30,10 @@ import { ErrorMessage } from './ErrorMessage' export interface TextFieldProps< TFieldValues extends FieldValues, TName extends FieldPath, -> extends UITextFieldProps { +> extends Omit { name: TName /** HTML type attribute, defaults to text */ - type?: string + type?: Omit /** Will default to name if not provided */ label?: string /** @@ -134,7 +134,7 @@ export const TextFieldInner = <