From 75ee2347e5a8429e797e92f78eeead20da190197 Mon Sep 17 00:00:00 2001 From: Yuraima Estevez Date: Fri, 29 Mar 2024 12:15:38 -0500 Subject: [PATCH 1/2] conditionally render loading markup --- polaris-react/src/components/IndexTable/IndexTable.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/polaris-react/src/components/IndexTable/IndexTable.tsx b/polaris-react/src/components/IndexTable/IndexTable.tsx index 0010a282b60..44c8e5f98a1 100644 --- a/polaris-react/src/components/IndexTable/IndexTable.tsx +++ b/polaris-react/src/components/IndexTable/IndexTable.tsx @@ -548,7 +548,7 @@ function IndexTableBase({ exitActive: styles['LoadingContainer-exit-active'], }; - const loadingMarkup = ( + const loadingMarkup = loading ? ( - ); + ) : null; const stickyTableClassNames = classNames( styles.StickyTable, From 56a7fc1403271ab51e51da2af3ab29e4f4c65510 Mon Sep 17 00:00:00 2001 From: Yuraima Estevez Date: Fri, 29 Mar 2024 12:16:53 -0500 Subject: [PATCH 2/2] changeset --- .changeset/famous-gorillas-raise.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/famous-gorillas-raise.md diff --git a/.changeset/famous-gorillas-raise.md b/.changeset/famous-gorillas-raise.md new file mode 100644 index 00000000000..a837eda2694 --- /dev/null +++ b/.changeset/famous-gorillas-raise.md @@ -0,0 +1,5 @@ +--- +'@shopify/polaris': patch +--- + +[IndexTable] Conditionally render loading markup to fix loading component