diff --git a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap index 396eaf5a04a0..c65128e8c446 100644 --- a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap +++ b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap @@ -1688,6 +1688,9 @@ Map { "expandIconDescription": Object { "type": "string", }, + "id": Object { + "type": "string", + }, "isExpanded": [Function], "onExpand": Object { "args": Array [ @@ -1701,9 +1704,6 @@ Map { }, }, "TableExpandRow": Object { - "defaultProps": Object { - "expandHeader": "expand", - }, "propTypes": Object { "ariaLabel": Object { "isRequired": true, @@ -6960,6 +6960,9 @@ Map { "expandIconDescription": Object { "type": "string", }, + "id": Object { + "type": "string", + }, "isExpanded": [Function], "onExpand": Object { "args": Array [ @@ -6973,9 +6976,6 @@ Map { }, }, "TableExpandRow" => Object { - "defaultProps": Object { - "expandHeader": "expand", - }, "propTypes": Object { "ariaLabel": Object { "isRequired": true, diff --git a/packages/react/src/components/DataTable/TableExpandHeader.js b/packages/react/src/components/DataTable/TableExpandHeader.js index 93d7f1eee286..fe65758fc693 100644 --- a/packages/react/src/components/DataTable/TableExpandHeader.js +++ b/packages/react/src/components/DataTable/TableExpandHeader.js @@ -18,6 +18,7 @@ const TableExpandHeader = ({ className: headerClassName, enableExpando, enableToggle, + id = 'expand', isExpanded, onExpand, expandIconDescription, @@ -33,6 +34,7 @@ const TableExpandHeader = ({ scope="col" className={className} data-previous-value={previousValue} + id={id} {...rest}> {enableExpando || enableToggle ? (