Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Commit

Permalink
Fix listings column picker menu
Browse files Browse the repository at this point in the history
  • Loading branch information
rehandalal committed Jun 21, 2018
1 parent 32c03d8 commit 8eb7fef
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/components/common/CheckboxMenu.js
@@ -1,4 +1,4 @@
import { Button, Checkbox, Dropdown } from 'antd';
import { Button, Checkbox, Popover } from 'antd';
import PropTypes from 'prop-types';
import React from 'react';

Expand All @@ -21,13 +21,18 @@ export default class CheckboxMenu extends React.PureComponent {
const { checkboxes, label, onChange, options } = this.props;

const menu = (
<Checkbox.Group onChange={onChange} options={options} defaultValue={checkboxes} />
<Checkbox.Group
className="checkbox-menu"
onChange={onChange}
options={options}
defaultValue={checkboxes}
/>
);

return (
<Dropdown overlay={menu}>
<Popover content={menu} trigger="click" placement="bottomLeft">
<Button icon="bars">{label}</Button>
</Dropdown>
</Popover>
);
}
}
10 changes: 10 additions & 0 deletions src/less/components/checkbox-menu.less
@@ -0,0 +1,10 @@
.checkbox-menu {
.ant-checkbox-group-item {
display: block;
margin: 0 0 8px 0;

&:last-child {
margin-bottom: 0;
}
}
}
1 change: 1 addition & 0 deletions src/less/components/index.less
@@ -1,4 +1,5 @@
@import 'boolean-icon';
@import 'checkbox-menu';
@import 'identicons';
@import 'form-actions';
@import 'history-timeline';
Expand Down

0 comments on commit 8eb7fef

Please sign in to comment.