From 01b55afe7cb7848cfd2308f0b2ab17f0dce1a3d6 Mon Sep 17 00:00:00 2001 From: Connor Riva Date: Wed, 8 Nov 2023 12:15:08 -0500 Subject: [PATCH] feat(UncontrolledTable): allow disabled attribute to be passed in with rows --- src/components/Table/SortableTable.js | 2 ++ src/components/Table/SortableTable.spec.js | 18 ++++++++++ src/components/Table/UncontrolledTable.js | 10 ++++-- .../Table/UncontrolledTable.spec.js | 34 +++++++++++++++++++ .../Table/UncontrolledTable.stories.js | 2 ++ 5 files changed, 64 insertions(+), 2 deletions(-) diff --git a/src/components/Table/SortableTable.js b/src/components/Table/SortableTable.js index 98656579d..6079d389a 100644 --- a/src/components/Table/SortableTable.js +++ b/src/components/Table/SortableTable.js @@ -74,6 +74,7 @@ function defaultRenderRow( function getSelectableCell(row, rowSelected, onSelect) { const selectRowId = uniqueId('select-row-'); + const disabled = Object.hasOwn(row, 'disabled') ? row.disabled : false; return ( <>