I've been trying to log my event object value in 'option' tag and it does not work, but it does work in select tag, here is my code:
{data.map((item, index) => { const {name, options} = item; return ( <div className="item" key={name}> <label htmlFor={name}> Select any {name}: <select name={name} id={name} onClick={(e) => console.log(e.target.value)}> <option disabled selected>Any {name}</option> {options.map((item, index) => { return ( <option value={item} key={index} onClick={(e) => console.log(e.target.value)} >{item}</option> ) })} </select> </label> </div> ) })} what's wrong with my option tag?
optiondoes not triggeronClickin chrome) stackoverflow.com/questions/22482842/…