convert locales-dropdown component
This commit is contained in:
parent
6e7f35270e
commit
b83a85564d
@ -10,12 +10,10 @@ const propTypes = {
|
|||||||
handleChange: PropTypes.func.isRequired,
|
handleChange: PropTypes.func.isRequired,
|
||||||
elementId: PropTypes.string.isRequired,
|
elementId: PropTypes.string.isRequired,
|
||||||
selectMessage: PropTypes.string.isRequired,
|
selectMessage: PropTypes.string.isRequired,
|
||||||
elementClass: PropTypes.string,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const defaultProps = {
|
const defaultProps = {
|
||||||
value: null,
|
value: null,
|
||||||
elementClass: null,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class LocalesDropdown extends PureComponent {
|
class LocalesDropdown extends PureComponent {
|
||||||
@ -48,7 +46,7 @@ class LocalesDropdown extends PureComponent {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
value, handleChange, elementId, selectMessage, elementClass,
|
value, handleChange, elementId, selectMessage,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const defaultLocale = value || DEFAULT_VALUE;
|
const defaultLocale = value || DEFAULT_VALUE;
|
||||||
|
|
||||||
@ -59,7 +57,6 @@ class LocalesDropdown extends PureComponent {
|
|||||||
id={elementId}
|
id={elementId}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
value={defaultLocale}
|
value={defaultLocale}
|
||||||
className={elementClass}
|
|
||||||
>
|
>
|
||||||
<option disabled key={DEFAULT_KEY} value={DEFAULT_VALUE}>
|
<option disabled key={DEFAULT_KEY} value={DEFAULT_VALUE}>
|
||||||
{selectMessage}
|
{selectMessage}
|
||||||
|
Loading…
Reference in New Issue
Block a user