diff --git a/awx/ui_next/src/components/DataListToolbar/DataListToolbar.jsx b/awx/ui_next/src/components/DataListToolbar/DataListToolbar.jsx
index c38823a81a..cc4b44dc72 100644
--- a/awx/ui_next/src/components/DataListToolbar/DataListToolbar.jsx
+++ b/awx/ui_next/src/components/DataListToolbar/DataListToolbar.jsx
@@ -37,7 +37,7 @@ class DataListToolbar extends React.Component {
additionalControls,
i18n,
qsConfig,
- pagination
+ pagination,
} = this.props;
const showExpandCollapse = onCompact && onExpand;
@@ -92,11 +92,9 @@ class DataListToolbar extends React.Component {
{control}
))}
- {(pagination && itemCount > 0) &&
-
- {pagination}
-
- }
+ {pagination && itemCount > 0 && (
+ {pagination}
+ )}
);
diff --git a/awx/ui_next/src/components/DataListToolbar/DataListToolbar.test.jsx b/awx/ui_next/src/components/DataListToolbar/DataListToolbar.test.jsx
index 34ad41e63c..b8b83ee6e2 100644
--- a/awx/ui_next/src/components/DataListToolbar/DataListToolbar.test.jsx
+++ b/awx/ui_next/src/components/DataListToolbar/DataListToolbar.test.jsx
@@ -285,21 +285,4 @@ describe('', () => {
const checkbox = toolbar.find('Checkbox');
expect(checkbox.prop('isChecked')).toBe(true);
});
-
- test('it shows item count', () => {
- const searchColumns = [{ name: 'Name', key: 'name', isDefault: true }];
- const sortColumns = [{ name: 'Name', key: 'name' }];
- const itemCount = 5;
-
- toolbar = mountWithContexts(
-
- );
- const count = toolbar.find('#item-count');
- expect(count.at(0).text()).toEqual('5 results');
- });
});
diff --git a/awx/ui_next/src/components/ListHeader/ListHeader.jsx b/awx/ui_next/src/components/ListHeader/ListHeader.jsx
index 255120f74c..305c741a47 100644
--- a/awx/ui_next/src/components/ListHeader/ListHeader.jsx
+++ b/awx/ui_next/src/components/ListHeader/ListHeader.jsx
@@ -98,7 +98,7 @@ class ListHeader extends React.Component {
renderToolbar,
qsConfig,
location,
- pagination
+ pagination,
} = this.props;
const params = parseQueryString(qsConfig, location.search);
const isEmpty = itemCount === 0 && Object.keys(params).length === 0;
@@ -128,7 +128,7 @@ class ListHeader extends React.Component {
onRemove: this.handleRemove,
clearAllFilters: this.handleRemoveAll,
qsConfig,
- pagination
+ pagination,
})}
)}
@@ -143,11 +143,10 @@ ListHeader.propTypes = {
searchColumns: SearchColumns.isRequired,
sortColumns: SortColumns.isRequired,
renderToolbar: PropTypes.func,
- pagination: PropTypes.element
};
ListHeader.defaultProps = {
- renderToolbar: props =>
+ renderToolbar: props => ,
};
export default withRouter(ListHeader);
diff --git a/awx/ui_next/src/components/PaginatedDataList/PaginatedDataList.jsx b/awx/ui_next/src/components/PaginatedDataList/PaginatedDataList.jsx
index da2e485134..d25ad79e6b 100644
--- a/awx/ui_next/src/components/PaginatedDataList/PaginatedDataList.jsx
+++ b/awx/ui_next/src/components/PaginatedDataList/PaginatedDataList.jsx
@@ -121,7 +121,7 @@ class PaginatedDataList extends React.Component {
);
}
- let ToolbarPagination = (
+ const ToolbarPagination = (
- )
+ );
return (
@@ -153,8 +153,7 @@ class PaginatedDataList extends React.Component {
sortColumns={sortColumns}
qsConfig={qsConfig}
pagination={ToolbarPagination}
- >
-
+ />
{Content}
{items.length ? (
', () => {
{ context: { router: { history } } }
);
- const pagination = wrapper.find('Pagination');
+ const pagination = wrapper.find('Pagination').at(1);
pagination.prop('onSetPage')(null, 2);
expect(history.location.search).toEqual('?item.page=2');
wrapper.update();
@@ -82,7 +82,7 @@ describe('', () => {
{ context: { router: { history } } }
);
- const pagination = wrapper.find('Pagination');
+ const pagination = wrapper.find('Pagination').at(1);
pagination.prop('onPerPageSelect')(null, 25, 2);
expect(history.location.search).toEqual('?item.page=2&item.page_size=25');
wrapper.update();