Link to home
Start Free TrialLog in
Avatar of Sam T
Sam T

asked on

How to get dropdown list selected item from one class component to another class component in React?

I have a class component named as "Inspector.js" for dropdown list as shown below.
User generated image
And, I have another class component named as "InspectionForm" that uses above dropdown class "Inspector" as a class as shown below.
User generated image
My problem is how would I retrieve the item selected from another dropdown class and pass it in "this.state" of "InspectionForm" class, so I can pass those as a json body obect to backend api.

User generated image
ASKER CERTIFIED SOLUTION
Avatar of Michael Arciniega
Michael Arciniega
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial