Fix FormNumericInput incorrect border highlighting (warn/error) and default error message text

This commit is contained in:
2026-02-10 18:39:03 +00:00
parent b198164760
commit cafc0a266d

View File

@@ -50,7 +50,7 @@ const FormNumericInput = React.forwardRef<HTMLInputElement, NumericInputProps>(
error = false,
warning = false,
required = false,
errorMessage = 'Time is required',
errorMessage = 'Value is required',
warningMessage,
inputWidth = 'w-20', // Default width
className,
@@ -221,11 +221,7 @@ const FormNumericInput = React.forwardRef<HTMLInputElement, NumericInputProps>(
type="button"
variant="outline"
size="icon"
className={cn(
"h-9 w-9 rounded-l-none rounded-r-none border-l-0",
//hasError && "error-border",
//hasWarning && !hasError && "warning-border"
)}
className="h-9 w-9 rounded-l-none rounded-r-none border-l-0"
onClick={() => updateValue(-1)}
disabled={isAtMin}
tabIndex={-1}
@@ -255,11 +251,7 @@ const FormNumericInput = React.forwardRef<HTMLInputElement, NumericInputProps>(
tooltip={t('buttonResetToDefault')}
variant="outline"
size="icon"
className={cn(
"h-9 w-9 rounded-l-none",
hasError && "error-border",
hasWarning && !hasError && "warning-border"
)}
className="h-9 w-9 rounded-l-none"
onClick={() => onChange(String(defaultValue ?? ''))}
tabIndex={-1}
/>