From 83ee60d715dffd26f6970b7cf0d2c0d6fd8e7801 Mon Sep 17 00:00:00 2001 From: gargroh <42495927+gargroh@users.noreply.github.com> Date: Mon, 14 Oct 2019 20:54:05 +0530 Subject: [PATCH] [useTable] Manage layout to honor column's `show` property (#1594) --- src/hooks/useTable.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/hooks/useTable.js b/src/hooks/useTable.js index 3c27a38..5723e0a 100755 --- a/src/hooks/useTable.js +++ b/src/hooks/useTable.js @@ -447,9 +447,10 @@ function calculateHeaderWidths(headers, left = 0) { header.maxWidth ) } - - left += header.totalWidth - sumTotalWidth += header.totalWidth + if (header.isVisible) { + left += header.totalWidth + sumTotalWidth += header.totalWidth + } }) return sumTotalWidth