The onchange event of antd's input is triggered repeatedly, under Microsoft Pinyin

    handleFormField(field,e){
        if (!field) return;
        
        let value = e.target.value;

        // if(field==="basename"){
        //     value = value.replace(/[^\u4e00-\u9fa5_a-zA-Z0-9]/g,"")
        // }
        this.setState({
            [field]:value
        });
    }

the onchange event restricts input, but how many other input methods will be triggered repeatedly in Microsoft Pinyin?

Mar.28,2021

there is no problem only in what you type, and it doesn't matter if you trigger it multiple times.


https://developer.mozilla.org.

Menu