Search code examples
reactjsreduxreact-reduxredux-thunkreact-redux-form

Populate Second Dropdown with React Redux Form


I am trying to populate the second dropdown base on the first drop down selections.

I am using React Redux form library (https://github.com/davidkpiano/react-redux-form)

Here is my code sandbox (https://codesandbox.io/s/k38k75ny8v) to see what I am dealing with. I am trying to dispatch an action.change to load the updated set of data base on the first selections.

Any help would be appreciated.

Thanks


Solution

  • I ended up doing the following:

    1. Setting the initial states that was array of objects objects.
    2. Created a action that would fetch the data and grabbed the first drop down value pass it as a param.
    3. Then dispatch action.change (from the library) and had it updated its state.

    Thanks for everyone that chimed in.