diff --git a/client/coral-admin/src/routes/Community/components/Table.js b/client/coral-admin/src/routes/Community/components/Table.js index 846287dc1..f6f6beca4 100644 --- a/client/coral-admin/src/routes/Community/components/Table.js +++ b/client/coral-admin/src/routes/Community/components/Table.js @@ -6,13 +6,15 @@ import {Dropdown, Option} from 'coral-ui'; import capitalize from 'lodash/capitalize'; const Table = ({headers, commenters, onHeaderClickHandler, onRoleChange, onCommenterStatusChange, viewUserDetail}) => ( -
| onHeaderClickHandler({field: header.field})}> {header.title} | @@ -21,12 +23,12 @@ const Table = ({headers, commenters, onHeaderClickHandler, onRoleChange, onComme|||
|---|---|---|---|
| + | |||
| {row.profiles.map(({id}) => id)} | -+ | {row.created_at} |
diff --git a/client/coral-ui/components/Dropdown.js b/client/coral-ui/components/Dropdown.js
index f840301a1..ec88cf1b2 100644
--- a/client/coral-ui/components/Dropdown.js
+++ b/client/coral-ui/components/Dropdown.js
@@ -25,12 +25,26 @@ class Dropdown extends React.Component {
});
}
- handleClick = () => {
+ toggle = () => {
this.setState({
isOpen: !this.state.isOpen
});
}
+ handleClick = () => {
+ this.toggle();
+ }
+
+ handleKeyDown = (e) => {
+ const code = e.which;
+
+ // 13 = Return, 32 = Space
+ if ((code === 13) || (code === 32)) {
+ e.preventDefault();
+ this.toggle();
+ }
+ }
+
hideMenu = () => {
this.setState({
isOpen: false
@@ -50,11 +64,11 @@ class Dropdown extends React.Component {
render() {
return (
+
{this.props.icon && |