Skip to content

Commit 8cfa7ca

Browse files
committed
fix(ui): fix input pass dModel not work
1 parent 84f4189 commit 8cfa7ca

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/ui/src/components/input/Input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export function DInput(props: DInputProps): JSX.Element | null {
9797
const onDestroy$ = useMemo(() => new Subject<void>(), []);
9898
const formControlInject = useFormControl(dFormControl);
9999
const [_value, changeValue] = useDValue<string>('', dModel, onModelChange, undefined, formControlInject);
100-
if (_value !== dataRef.current.prevValue) {
100+
if (!(dType === 'number' && (!isUndefined(dMax) || !isUndefined(dMin))) || _value !== dataRef.current.prevValue) {
101101
dataRef.current.showValue = dataRef.current.prevValue = _value;
102102
}
103103

0 commit comments

Comments
 (0)