I am facing an issue while trying to incorporate the input type file within a dropdown item inside an anchor tag.
Here is the code snippet causing the problem:
<div className="dropdown-menu actions-text">
<a className="dropdown-item" href="#" onClick={e => props.viewJob(e, item.id, item.jdName)}>
<i className="fa fa-envelope mr-2 view-icon" />
View JD
</a>
<a className="dropdown-item" href='#'>
<i className="fa fa-cloud-upload mr-2 upload-icon" aria-hidden="true" />
Upload Resume
</a>
<input type='file' title="" onChange={(e) => { props.uploadResumeFolder(e, item.id, item.jdName) }}
directory="" webkitdirectory="" mozdirectory="" allowdirs="" multiple />
<a className="dropdown-item" href="#"><i className="fa fa-download mr-2 download-icon" aria-hidden="true" />
Download Tracker</a>
</div>
Whenever I add another option at the top, the next one in line gets clicked instead of the desired file upload option. It always selects the second one by default.
How can I fix this issue?