diff --git a/src/Configuration/Customers/CustomerDataTable/CustomersPage.jsx b/src/Configuration/Customers/CustomerDataTable/CustomersPage.jsx index 824208622..ec7089637 100644 --- a/src/Configuration/Customers/CustomerDataTable/CustomersPage.jsx +++ b/src/Configuration/Customers/CustomerDataTable/CustomersPage.jsx @@ -4,6 +4,7 @@ import React, { useCallback, useEffect, } from 'react'; +import PropTypes from 'prop-types'; import debounce from 'lodash.debounce'; import { Container, DataTable, TextFilter, @@ -20,6 +21,12 @@ import { import LmsApiService from '../../../data/services/EnterpriseApiService'; import CustomerDetailRowSubComponent from './CustomerDetailSubComponent'; +const expandAllRowsHandler = ({ getToggleAllRowsExpandedProps }) => ( + +); + const CustomersPage = () => { const [enterpriseList, setEnterpriseList] = useState([]); const [isLoading, setIsLoading] = useState(true); @@ -67,7 +74,7 @@ const CustomersPage = () => { columns={[ { id: 'expander', - Header: DataTable.ExpandAll, + Header: expandAllRowsHandler, Cell: DataTable.ExpandRow, }, { @@ -104,4 +111,8 @@ const CustomersPage = () => { ); }; +expandAllRowsHandler.propTypes = { + getToggleAllRowsExpandedProps: PropTypes.func.isRequired, +}; + export default CustomersPage; diff --git a/src/Configuration/Customers/CustomerDataTable/tests/CustomersPage.test.jsx b/src/Configuration/Customers/CustomerDataTable/tests/CustomersPage.test.jsx index 6c5fc3859..81c094059 100644 --- a/src/Configuration/Customers/CustomerDataTable/tests/CustomersPage.test.jsx +++ b/src/Configuration/Customers/CustomerDataTable/tests/CustomersPage.test.jsx @@ -47,7 +47,7 @@ describe('CustomersPage', () => { expect(screen.getByText('SSO Check')).toBeInTheDocument(); expect(screen.getByText('API Check')).toBeInTheDocument(); }); - + expect(screen.getByText('View subsidies')).toBeInTheDocument(); expect(screen.getByText('Customers')).toBeInTheDocument(); expect(screen.getByText('Customer details')).toBeInTheDocument(); expect(screen.getByText('SSO')).toBeInTheDocument();