diff --git a/src-docs/src/views/tables/basic/basic.js b/src-docs/src/views/tables/basic/basic.js index ca6f08f0c8dc..dbe7c930fd0c 100644 --- a/src-docs/src/views/tables/basic/basic.js +++ b/src-docs/src/views/tables/basic/basic.js @@ -91,11 +91,12 @@ export const Table = () => { }; }; - const getCellProps = (item, column, columnIndex) => { + const getCellProps = (item, column) => { const { id } = item; + const { field } = column; return { className: 'customCellClass', - 'data-test-subj': `cell-${id}-${columnIndex}`, + 'data-test-subj': `cell-${id}-${field}`, }; }; diff --git a/src/components/basic_table/__snapshots__/basic_table.test.js.snap b/src/components/basic_table/__snapshots__/basic_table.test.js.snap index e3c98dd8fe49..b6e91edcfa26 100644 --- a/src/components/basic_table/__snapshots__/basic_table.test.js.snap +++ b/src/components/basic_table/__snapshots__/basic_table.test.js.snap @@ -28,7 +28,7 @@ exports[`EuiBasicTable cellProps renders cells with custom props from a callback { description: 'description' } ], - cellProps: (item, column, columnIndex) => { + cellProps: (item, column) => { const { id } = item; const { field } = column; return { - 'data-test-subj': `cell-${id}-${columnIndex}-${field}`, + 'data-test-subj': `cell-${id}-${field}`, className: 'customRowClass', onClick: () => {}, };