Skip to content

Commit

Permalink
Add ability to use Ant's Table loading property when using ItemsTable (
Browse files Browse the repository at this point in the history
  • Loading branch information
arikfr authored Sep 2, 2019
1 parent 5ae8083 commit 43f63b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/app/components/items-list/components/ItemsTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Columns.custom.sortable = sortable;

export default class ItemsTable extends React.Component {
static propTypes = {
loading: PropTypes.bool,
// eslint-disable-next-line react/forbid-prop-types
items: PropTypes.arrayOf(PropTypes.object),
columns: PropTypes.arrayOf(PropTypes.shape({
Expand All @@ -89,6 +90,7 @@ export default class ItemsTable extends React.Component {
};

static defaultProps = {
loading: false,
items: [],
columns: [],
showHeader: true,
Expand Down Expand Up @@ -150,6 +152,7 @@ export default class ItemsTable extends React.Component {
return (
<Table
className={classNames('table-data', { 'ant-table-headerless': !showHeader })}
loading={this.props.loading}
columns={columns}
showHeader={showHeader}
dataSource={rows}
Expand Down

0 comments on commit 43f63b1

Please sign in to comment.