From aea76facf16bf21e5487b92c5fb36f7072d599d4 Mon Sep 17 00:00:00 2001 From: Codar <20407539+Codar97@users.noreply.github.com> Date: Mon, 9 Sep 2019 15:49:40 +0100 Subject: [PATCH] isAllRowsSelected can only be true if there are rows. (#1504) --- src/plugin-hooks/useRowSelect.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugin-hooks/useRowSelect.js b/src/plugin-hooks/useRowSelect.js index c3f4ac8..279b14f 100644 --- a/src/plugin-hooks/useRowSelect.js +++ b/src/plugin-hooks/useRowSelect.js @@ -38,7 +38,7 @@ function useMain(instance) { [] ) - const isAllRowsSelected = rowPaths.length === selectedRows.length + const isAllRowsSelected = rowPaths.length > 0 && rowPaths.length === selectedRows.length const toggleRowSelectedAll = set => { setState(old => {