Fix: Fix: The minimum value for the "Suggested text block size" input box is set to 1. (#14246)

### What problem does this PR solve?

Fix: The minimum value for the "Suggested text block size" input box is
set to 1.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu
2026-04-21 14:06:36 +08:00
committed by GitHub
parent b3891ba6a4
commit 78b800e685
4 changed files with 240 additions and 105 deletions

View File

@@ -2,6 +2,7 @@ import { useTranslate } from '@/hooks/common-hooks';
import { cn } from '@/lib/utils';
import { forwardRef } from 'react';
import { useFormContext } from 'react-hook-form';
import NumberInput from '../originui/number-input';
import { SingleFormSlider } from '../ui/dual-range-slider';
import {
FormControl,
@@ -10,7 +11,6 @@ import {
FormLabel,
FormMessage,
} from '../ui/form';
import { NumberInput } from '../ui/input';
import { Switch } from '../ui/switch';
type SliderInputSwitchFormFieldProps = {
@@ -95,14 +95,12 @@ export const SliderInputSwitchFormField = forwardRef<
<FormControl>
<NumberInput
disabled={disabled}
className={cn(
'h-6 w-10 p-1 border border-border-button rounded-sm',
numberInputClassName,
)}
className={cn('h-6 w-16', numberInputClassName)}
max={max}
min={min}
step={step}
{...field}
hideIcons
onChange={(value: number) => {
onChange?.(value);
field.onChange(value);