Fix select widgets with object type options.
This commit is contained in:
parent
ba9b787366
commit
43a6c6ff15
@ -1,7 +1,7 @@
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||||
import { isMap } from 'immutable';
|
import { Map } from 'immutable';
|
||||||
|
|
||||||
export default class SelectControl extends React.Component {
|
export default class SelectControl extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
@ -40,7 +40,7 @@ export default class SelectControl extends React.Component {
|
|||||||
if (typeof option === 'string') {
|
if (typeof option === 'string') {
|
||||||
return { label: option, value: option };
|
return { label: option, value: option };
|
||||||
}
|
}
|
||||||
return isMap(option) ? option.toJS() : option;
|
return Map.isMap(option) ? option.toJS() : option;
|
||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user