title: React hidden input type file onChange not firing
body: <pre><code>const passFromPicToUpload = (e) =&gt;{
          hiddenFileInput.current.click();
          console.log(&quot;one&quot;)
      }
  
  const handleProfilePicUpload = (e) =&gt;{
      console.log(&quot;two&quot;)
  
      if(e.target.files[0]){
          setImage(e.target.files[0]);
          
      }
  }
  
   return (
       &lt;div className=&quot;profile&quot;&gt;
        &lt;div className=&quot;imageContainer&quot; &gt;
         &lt;a href=&quot;#&quot; onClick={passFromPicToUpload}&gt;
          {
            profile.avatarUrl?&lt;Image src={profile.avatarUrl} className=&quot;profile__image&quot;  /&gt; :&lt;Image src=&quot;https://i.stack.imgur.com/l60Hf.png&quot; className=&quot;profile__image&quot; /&gt; 
          }
         &lt;/a&gt;
        &lt;/div&gt;   
       &lt;input type=&quot;file&quot; ref={hiddenFileInput} onChange={handleProfilePicUpload} style={{display:'none'}} /&gt; 
  
   &lt;/div&gt;
  )
  </code></pre>
  <p>So basically the file choosing window is showing but after I choose a pic the &quot;handleProfilePicUpload&quot; is not firing.</p>