From 020b7469d9ef1b9b545a23a40565a2a9c2efc1fc Mon Sep 17 00:00:00 2001 From: Sam Gluck Date: Fri, 17 Jan 2020 10:51:24 +0000 Subject: [PATCH] [docs] Improve EnhancedTable.tsx demo (#19266) --- docs/src/pages/components/tables/EnhancedTable.js | 2 +- docs/src/pages/components/tables/EnhancedTable.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/pages/components/tables/EnhancedTable.js b/docs/src/pages/components/tables/EnhancedTable.js index d59aa3f73a9f55..b50e12a03365b5 100644 --- a/docs/src/pages/components/tables/EnhancedTable.js +++ b/docs/src/pages/components/tables/EnhancedTable.js @@ -85,7 +85,7 @@ function EnhancedTableHead(props) { 0 && numSelected < rowCount} - checked={numSelected === rowCount} + checked={rowCount > 0 && numSelected === rowCount} onChange={onSelectAllClick} inputProps={{ 'aria-label': 'select all desserts' }} /> diff --git a/docs/src/pages/components/tables/EnhancedTable.tsx b/docs/src/pages/components/tables/EnhancedTable.tsx index 54645d21c50740..377bc92c56d77e 100644 --- a/docs/src/pages/components/tables/EnhancedTable.tsx +++ b/docs/src/pages/components/tables/EnhancedTable.tsx @@ -120,7 +120,7 @@ function EnhancedTableHead(props: EnhancedTableProps) { 0 && numSelected < rowCount} - checked={numSelected === rowCount} + checked={rowCount > 0 && numSelected === rowCount} onChange={onSelectAllClick} inputProps={{ 'aria-label': 'select all desserts' }} />