title: Conditional dropdowns with react-select and react-final-form field arrays
body: <p>I'm using <code>react-select</code> with <code>react-final-form</code> and I need to have two selects, where the selected option in the first select dynamically sets the options for the second select. For example, when option One is selected in the first select, the second select gets options One A and One B.</p>
  
  <p>These selects are used in an array. Here is my codesandbox with initial setup <a href="https://codesandbox.io/s/react-final-form-field-arrays-e4mm6?fontsize=14" rel="nofollow noreferrer">https://codesandbox.io/s/react-final-form-field-arrays-e4mm6?fontsize=14</a>.</p>
  
  <p>I've found two similar examples, but I don't know how to adapt them to my use case.</p>
  
  <p>First, I've found <a href="https://codesandbox.io/s/react-final-form-accessing-other-field-values-dfx44" rel="nofollow noreferrer">this example</a> for <code>react-final-form</code> which sets field's value using <code>createDecorator</code>, but it's used for the value of the field and not the options prop.</p>
  
  <p>Second, I've found <a href="https://stackblitz.com/edit/react-mvqwr7" rel="nofollow noreferrer">this example</a> for <code>react-select</code> which sets options dynamically using state, but I don't know how I can adapt it to my case, considering field arrays.</p>
  
  <p>I would appreciate any help.</p>