From 593b6c938156aee80f179f25103c4b2941c6e6e3 Mon Sep 17 00:00:00 2001 From: Jorge Moya Date: Thu, 2 Jan 2025 20:46:52 -0600 Subject: [PATCH] fix: remove empty string in value (#1832) --- core/vibes/soul/form/input/index.tsx | 3 +-- core/vibes/soul/form/number-input/index.tsx | 18 ++++++++---------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/core/vibes/soul/form/input/index.tsx b/core/vibes/soul/form/input/index.tsx index bd9e6a0f6b..e81268e368 100644 --- a/core/vibes/soul/form/input/index.tsx +++ b/core/vibes/soul/form/input/index.tsx @@ -11,7 +11,7 @@ export const Input = React.forwardRef< label?: string; errors?: string[]; } ->(({ prepend, label, className, required, errors, value, ...rest }, ref) => { +>(({ prepend, label, className, required, errors, ...rest }, ref) => { const id = React.useId(); return ( @@ -36,7 +36,6 @@ export const Input = React.forwardRef< )} id={id} ref={ref} - value={value ?? ''} /> {errors?.map((error) => {error})} diff --git a/core/vibes/soul/form/number-input/index.tsx b/core/vibes/soul/form/number-input/index.tsx index 13d0a33765..3deead033c 100644 --- a/core/vibes/soul/form/number-input/index.tsx +++ b/core/vibes/soul/form/number-input/index.tsx @@ -24,8 +24,7 @@ export const NumberInput = React.forwardRef< errors, decrementLabel, incrementLabel, - disabled, - value, + disabled = false, ...rest }, ref, @@ -40,8 +39,8 @@ export const NumberInput = React.forwardRef< aria-label={decrementLabel} className={clsx( 'group rounded-l-lg p-3.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary', - disabled === false && 'hover:bg-contrast-100/50', - disabled === true && 'cursor-not-allowed opacity-30', + !disabled && 'hover:bg-contrast-100/50', + disabled && 'cursor-not-allowed opacity-30', )} disabled={disabled} onClick={(e) => { @@ -56,7 +55,7 @@ export const NumberInput = React.forwardRef<