input-number
input-number copied to clipboard
win10,chrome浏览器,微软拼音中文输入法,formatter导致onChange会触发两次
问题表现同 #276
问题描述: 比如存在formatter函数时(见下面地址), 当输入1234时,期待显示$1,234, 但是实际显示$12,344
复现地址:http://react-component.github.io/input-number/examples?path=/story/rc-input-number--formatter
复现的环境: windows10, chrome浏览器版本号:87.0.4280.88, 微软拼音输入法切换到中文输入状态。
进一步研究源码发现,当存在formatter属性并且formatter返回一个新的值时,会触发onChange函数两次。
firefox表现正常,只会触发onChange一次。 中文其他输入法(如qq拼音输入法)没有问题,微软拼音输入法英文状态也没有问题。 mac下表现正常。