Can't type in React input text field

后端 未结 8 2270
无人共我
无人共我 2020-12-02 11:56

I\'m trying my first bit of React.js and am stumped early on... I have the code below, which renders a search form into

. B
8条回答
  •  臣服心动
    2020-12-02 12:28

    This might be caused by the onChange function is not updating the proper value which is mentioned in the input.

    Example:

    
    
     changeText(event){
            this.setState(
                {textValue : event.target.value}
            );
        }
    

    in the onChange function update the mentioned value field.

提交回复
热议问题