diff --git a/src/DataTable/ExpandRow.jsx b/src/DataTable/ExpandRow.jsx index 0d1d8892c4..6bfe45e318 100644 --- a/src/DataTable/ExpandRow.jsx +++ b/src/DataTable/ExpandRow.jsx @@ -6,9 +6,9 @@ import IconButton from '../IconButton'; const EXPAND_COLLAPSE_ICON_SIZE = 'inline'; -function ExpandRow({ row, ...rest }) { +function ExpandRow({ row }) { return ( - + {row.isExpanded ? : } diff --git a/src/DataTable/selection/ControlledSelect.jsx b/src/DataTable/selection/ControlledSelect.jsx index 255ca5f0ff..8eb702255e 100644 --- a/src/DataTable/selection/ControlledSelect.jsx +++ b/src/DataTable/selection/ControlledSelect.jsx @@ -10,7 +10,7 @@ import { addSelectedRowAction, } from './data/actions'; -function ControlledSelect({ row, ...rest }) { +function ControlledSelect({ row }) { const { itemCount, controlledTableSelections: [, dispatch], @@ -34,7 +34,6 @@ function ControlledSelect({ row, ...rest }) { ); diff --git a/src/DataTable/selection/ControlledSelectHeader.jsx b/src/DataTable/selection/ControlledSelectHeader.jsx index e59e6e2a0f..d858a5c4bd 100644 --- a/src/DataTable/selection/ControlledSelectHeader.jsx +++ b/src/DataTable/selection/ControlledSelectHeader.jsx @@ -9,7 +9,7 @@ import { setSelectedRowsAction, } from './data/actions'; -function ControlledSelectHeader({ rows, ...rest }) { +function ControlledSelectHeader({ rows }) { const { itemCount, controlledTableSelections: [, dispatch], @@ -44,7 +44,6 @@ function ControlledSelectHeader({ rows, ...rest }) { ); diff --git a/src/DataTable/selection/ControlledSelectionStatus.jsx b/src/DataTable/selection/ControlledSelectionStatus.jsx index f7a49e6dc4..3078dbf52e 100644 --- a/src/DataTable/selection/ControlledSelectionStatus.jsx +++ b/src/DataTable/selection/ControlledSelectionStatus.jsx @@ -14,7 +14,7 @@ import { getRowIds, } from './data/helpers'; -function ControlledSelectionStatus({ className, clearSelectionText, ...rest }) { +function ControlledSelectionStatus({ className, clearSelectionText }) { const { itemCount, page, @@ -44,7 +44,6 @@ function ControlledSelectionStatus({ className, clearSelectionText, ...rest }) { clearSelectionText, onSelectAll: () => dispatch(setSelectAllRowsAllPagesAction()), onClear: () => dispatch(clearSelectionAction()), - ...rest, }; return ; } diff --git a/src/DataTable/tests/ExpandRow.test.jsx b/src/DataTable/tests/ExpandRow.test.jsx index da17e520f6..d369b78c85 100644 --- a/src/DataTable/tests/ExpandRow.test.jsx +++ b/src/DataTable/tests/ExpandRow.test.jsx @@ -10,10 +10,7 @@ const row = { describe('', () => { it('renders expand row element if rows is not expanded', () => { - const { getByTestId, getByLabelText } = render(); - - const labelWrapper = getByTestId('span-expand-row'); - expect(labelWrapper).toBeInTheDocument(); + const { getByLabelText } = render(); const iconButton = getByLabelText('Expand row'); expect(iconButton).toBeInTheDocument(); @@ -21,10 +18,7 @@ describe('', () => { it('renders collapse row element if row is expanded', () => { const expandedRow = { ...row, isExpanded: true }; - const { getByTestId, getByLabelText } = render(); - - const labelWrapper = getByTestId('span-collapse-row'); - expect(labelWrapper).toBeInTheDocument(); + const { getByLabelText } = render(); const iconButton = getByLabelText('Collapse row'); expect(iconButton).toBeInTheDocument();