mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
fix: 修复数字输入框存在后缀时,清空数据,光标位置定位不准确
This commit is contained in:
parent
38cb208b98
commit
afcd44069b
@ -508,6 +508,14 @@ export default class NumberControl extends React.Component<
|
||||
value = numberFormatter(value, finalPrecision);
|
||||
}
|
||||
}
|
||||
if (
|
||||
suffix &&
|
||||
userTyping &&
|
||||
this.input?.selectionStart === input.length
|
||||
) {
|
||||
return `${prefix || ''}${value}`;
|
||||
}
|
||||
|
||||
return `${prefix || ''}${value}${suffix || ''}`;
|
||||
}
|
||||
: undefined;
|
||||
|
Loading…
Reference in New Issue
Block a user