diff --git a/client/coral-admin/src/routes/Community/components/Table.js b/client/coral-admin/src/routes/Community/components/Table.js
index 2efa5944b..846287dc1 100644
--- a/client/coral-admin/src/routes/Community/components/Table.js
+++ b/client/coral-admin/src/routes/Community/components/Table.js
@@ -35,8 +35,8 @@ const Table = ({headers, commenters, onHeaderClickHandler, onRoleChange, onComme
label={capitalize(row.status)}
placeholder={t('community.status')}
onChange={(status) => onCommenterStatusChange(row.id, status)}>
-
-
+
+
@@ -45,10 +45,10 @@ const Table = ({headers, commenters, onHeaderClickHandler, onRoleChange, onComme
label={capitalize(row.roles[0]) || t('community.none')}
placeholder={t('community.role')}
onChange={(role) => onRoleChange(row.id, role)}>
-
-
-
-
+
+
+
+
|
diff --git a/client/coral-admin/src/routes/Stories/components/Stories.js b/client/coral-admin/src/routes/Stories/components/Stories.js
index af6b7a8f7..7a1332b5a 100644
--- a/client/coral-admin/src/routes/Stories/components/Stories.js
+++ b/client/coral-admin/src/routes/Stories/components/Stories.js
@@ -69,8 +69,8 @@ class Stories extends Component {
value={closed}
label={closed ? t('streams.closed') : t('streams.open')}
onChange={(value) => this.onStatusClick(!value, id)}>
-
-
+
+
);
}
diff --git a/client/coral-ui/components/Dropdown.js b/client/coral-ui/components/Dropdown.js
index 820f33346..abbdf8a64 100644
--- a/client/coral-ui/components/Dropdown.js
+++ b/client/coral-ui/components/Dropdown.js
@@ -7,29 +7,22 @@ import ClickOutside from 'coral-framework/components/ClickOutside';
class Dropdown extends React.Component {
- constructor(props) {
- super(props);
+ constructor() {
+ super();
+
this.state = {
isOpen: false
};
}
-
- fireChange = (newState) => {
- if (this.props.onChange) {
- this.props.onChange(newState.selected.value);
- }
- }
setValue = (value, label) => {
- const newState = {
- selected: {
- label: label,
- value: value
- },
+ if (this.props.onChange) {
+ this.props.onChange(value, label);
+ }
+
+ this.setState({
isOpen: false
- };
- this.fireChange(newState);
- this.setState(newState);
+ });
}
handleClick = () => {
@@ -66,7 +59,7 @@ class Dropdown extends React.Component {
.map((child) =>
React.cloneElement(child, {
key: child.props.value,
- onClick: () => this.setValue(child.props.value, child.props.children)
+ onClick: () => this.setValue(child.props.value, child.props.label)
}))}
diff --git a/client/coral-ui/components/Option.js b/client/coral-ui/components/Option.js
index ffafe948c..8b8645528 100644
--- a/client/coral-ui/components/Option.js
+++ b/client/coral-ui/components/Option.js
@@ -3,15 +3,15 @@ import PropTypes from 'prop-types';
import styles from './Option.css';
import cn from 'classnames';
-const Option = ({className, children, onClick}) => (
+const Option = ({className, label = '', onClick}) => (
- {children || ''}
+ {label}
);
Option.propTypes = {
className: PropTypes.string,
- children: PropTypes.string,
+ label: PropTypes.string,
onClick: PropTypes.func,
value: PropTypes.oneOfType([
PropTypes.number,