Home > Software design >  React <select> automatic change does not trigger onChange
React <select> automatic change does not trigger onChange

Time:10-19

In my page, I have two <select> elements, where the options of the second one depends on the value of the first one.

In this case, the "problem" is that the options for a certain value in the first select are different from the options given when the first select has another value. Basically:

  • Alfa Romeo
    • Giulietta
    • Mito
  • Porsche
    • Cayenne
    • 911

I've created a simple fiddle just to show you the example, and the problem: Edit Select Autochange (forked)

  • Related