Closed dotkas closed 6 years ago
Didn't get it.
Aren't you able to do this?
<Field name="test" label="Test" type="select" component={ReduxField}>
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</Field>
Yes, but if you were to do it that way in the redux
branch, where most logic is moved out into containers?
In a component such as: https://github.com/diegohaz/arc/blob/redux/src-example/components/organisms/PostForm/index.js - the values are all generated programatically through the redux-form
props.
Still don't understand it.
If you are able to pass options={config.supportedCountryCodes}
, you can pass the following:
<Field name="test" label="Test" type="select" component={ReduxField}>
{config.supportedCountryCodes.map(e => <option key={e.key} value={e.value}>{e.label}</option>)}
</Field>
Why creating an abstraction for options
when you can just use it as native HTML?
I thought this was the intention of the <Input>
atom. I guess I have misunderstood it. Closing again.
Is it possible that the Input-tag atom does not in fact support the
<option>
children, when settingtype="select"
?I have not been able to find it in the
src-example
, so I have made a suggestion, let me know what you think.Which will then require an array of objects as such:
{ key: 'DK', value: '45', label: 'DK' }, { key: 'SE', value: '44', label: 'SE' }
And then use it something like:
And in a wrapping function somewhere: