DEV Community

Discussion on: JavaScript: Use the first Option of a Select as a Label

Collapse
 
crys_dev profile image
Vincent Rouilhac

Nice post ! To solve your issue I just put the event listener that calls resetOptions to not call it so the value is not reset when you click again.

Collapse
 
typo3freelancer profile image
Simon Köhler

You are right, somehow this one was not really needed. Well I did this whole thing in 15 minutes or so ;-) Thank you buddy I have changed the code!