diff --git a/packages/terra-framework-docs/src/terra-dev-site/test/table/TableSingleRowSelection.test.jsx b/packages/terra-framework-docs/src/terra-dev-site/test/table/TableSingleRowSelection.test.jsx index e6c298eb788..c465d494fda 100644 --- a/packages/terra-framework-docs/src/terra-dev-site/test/table/TableSingleRowSelection.test.jsx +++ b/packages/terra-framework-docs/src/terra-dev-site/test/table/TableSingleRowSelection.test.jsx @@ -64,13 +64,18 @@ const TableSingleRowSelection = () => { const [rowData, setRowData] = useState(rows); const onRowSelect = useCallback((rowId) => { - // Remove current selections const newRowData = [...rowData]; const dataRowToUpdate = newRowData.find(row => row.id === rowId); - if (dataRowToUpdate) { - dataRowToUpdate.isSelected = !dataRowToUpdate.isSelected; - } + + newRowData.forEach((row) => { + if (row.id !== dataRowToUpdate.id) { + // eslint-disable-next-line no-return-assign, no-param-reassign + row.isSelected = false; + } + }); + + dataRowToUpdate.isSelected = !dataRowToUpdate.isSelected; setRowData(newRowData); }, [rowData]);