Problem at the onchange function in the main component, when i type on the keyboard inside the input , the page refresh itself. thank

The problem with the code is that when I type on the keyboard inside the input the page flickers and refreshed

the code I’m struggling with is this :

 this.state = {
      search: "",
    };
changedInput = (e) => {
    // //change the state of search for the input
    // this.setState({search:e.target.value})
    
    this.setState({ search: e.target.value });
  };
 <ul style={{ display: this.state.contactsDisplay }}></ul>
        <label>
          <span>search</span>
          <input
            type="text"
            name="form_name"
            id="name"
            
             value={this.state.search}
            onChange={(e)=>{this.changedInput(e)}}
          />
        </label>