Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
<div>
<p>
Instrument:{' '}
<select> {
const selectedOption = event.target[event.target.selectedIndex];
const type = selectedOption.getAttribute('data-type');
dispatch({
type: types.UPDATE_INSTRUMENT,
instrumentType: type,
});
}}
value={currentTrack.instrumentType}
>
{constants.instruments.map((instrument, i) => {
const id = `${instrument.id}-${i}`;
return (
<option value="{instrument.id}" data-type="{instrument.id}" data-id="{id}">
{instrument.name}
</option>
);
})}
</select>
</p>
<div></div></div>