Skip to content

Commit

Permalink
feat: update expand all text on enterprise customer datatable
Browse files Browse the repository at this point in the history
  • Loading branch information
katrinan029 committed Sep 16, 2024
1 parent 0d5dba9 commit 397c65d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ const CustomersPage = () => {
columns={[
{
id: 'expander',
Header: DataTable.ExpandAll,
Header: ({ getToggleAllRowsExpandedProps }) => (

Check failure on line 70 in src/Configuration/Customers/CustomerDataTable/CustomersPage.jsx

View workflow job for this annotation

GitHub Actions / tests (20)

Do not define components during render. React will see a new component type on every render and destroy the entire subtree’s DOM nodes and state (https://reactjs.org/docs/reconciliation.html#elements-of-different-types). Instead, move this component definition out of the parent component “CustomersPage” and pass data as props. If you want to allow component creation in props, set allowAsProps option to true

Check failure on line 70 in src/Configuration/Customers/CustomerDataTable/CustomersPage.jsx

View workflow job for this annotation

GitHub Actions / tests (20)

'getToggleAllRowsExpandedProps' is missing in props validation
<button class="btn btn-link btn-inline font-weight-bold" {...getToggleAllRowsExpandedProps()}>

Check failure on line 71 in src/Configuration/Customers/CustomerDataTable/CustomersPage.jsx

View workflow job for this annotation

GitHub Actions / tests (20)

Missing an explicit type attribute for button

Check failure on line 71 in src/Configuration/Customers/CustomerDataTable/CustomersPage.jsx

View workflow job for this annotation

GitHub Actions / tests (20)

Unknown property 'class' found, use 'className' instead
View subsidies
</button>
),
Cell: DataTable.ExpandRow,
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 397c65d

Please sign in to comment.