Topic: MDBSelect not returning value for Options.

hoaraucg free asked 5 years ago


Expected behavior Form should take in all user information and update state to construct a newuser.

Actual behavior Only Name, Email and password function in this fashion using MDBInput, All of my MDBSelect fields will not pass the value back to state.

Resources (screenshots, code snippets etc.) https://jsfiddle.net/djt2cr31/


Konrad Stępień staff answered 5 years ago


Hi @hoaraucg,

I fix your problem with using Controlled select and we also encourage you to use this way to render selects.

This is my code with two way to change state, with getValue and getTextContent. https://jsfiddle.net/j1whbz7o/

Best regards, Konrad.


hoaraucg free commented 5 years ago

Absolutely exactly what I needed, Thanks so much for the help!


Konrad Stępień staff commented 5 years ago

Thanks very much for your feedback!

If there is anything else I could do for you do not hesitate to ask me. I'll be happy to help you.

Best Regards, Konrad.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.18.0
  • Device: PC
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes
Tags