Fix FormNumericInput incorrect border highlighting (warn/error) and default error message text
This commit is contained in:
@@ -50,7 +50,7 @@ const FormNumericInput = React.forwardRef<HTMLInputElement, NumericInputProps>(
|
|||||||
error = false,
|
error = false,
|
||||||
warning = false,
|
warning = false,
|
||||||
required = false,
|
required = false,
|
||||||
errorMessage = 'Time is required',
|
errorMessage = 'Value is required',
|
||||||
warningMessage,
|
warningMessage,
|
||||||
inputWidth = 'w-20', // Default width
|
inputWidth = 'w-20', // Default width
|
||||||
className,
|
className,
|
||||||
@@ -221,11 +221,7 @@ const FormNumericInput = React.forwardRef<HTMLInputElement, NumericInputProps>(
|
|||||||
type="button"
|
type="button"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
size="icon"
|
size="icon"
|
||||||
className={cn(
|
className="h-9 w-9 rounded-l-none rounded-r-none border-l-0"
|
||||||
"h-9 w-9 rounded-l-none rounded-r-none border-l-0",
|
|
||||||
//hasError && "error-border",
|
|
||||||
//hasWarning && !hasError && "warning-border"
|
|
||||||
)}
|
|
||||||
onClick={() => updateValue(-1)}
|
onClick={() => updateValue(-1)}
|
||||||
disabled={isAtMin}
|
disabled={isAtMin}
|
||||||
tabIndex={-1}
|
tabIndex={-1}
|
||||||
@@ -255,11 +251,7 @@ const FormNumericInput = React.forwardRef<HTMLInputElement, NumericInputProps>(
|
|||||||
tooltip={t('buttonResetToDefault')}
|
tooltip={t('buttonResetToDefault')}
|
||||||
variant="outline"
|
variant="outline"
|
||||||
size="icon"
|
size="icon"
|
||||||
className={cn(
|
className="h-9 w-9 rounded-l-none"
|
||||||
"h-9 w-9 rounded-l-none",
|
|
||||||
hasError && "error-border",
|
|
||||||
hasWarning && !hasError && "warning-border"
|
|
||||||
)}
|
|
||||||
onClick={() => onChange(String(defaultValue ?? ''))}
|
onClick={() => onChange(String(defaultValue ?? ''))}
|
||||||
tabIndex={-1}
|
tabIndex={-1}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user