From 5233dcf5dd28b367712787b4366a966c820805c0 Mon Sep 17 00:00:00 2001 From: Chloe Rice Date: Thu, 21 Mar 2024 17:13:45 -0400 Subject: [PATCH] [IndexTable.Row] Revert selectable=false early return, which break onNavigation for unselectable tables --- .changeset/real-papayas-tease.md | 5 +++++ .../src/components/IndexTable/components/Row/Row.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/real-papayas-tease.md diff --git a/.changeset/real-papayas-tease.md b/.changeset/real-papayas-tease.md new file mode 100644 index 00000000000..b5d23b6cc7a --- /dev/null +++ b/.changeset/real-papayas-tease.md @@ -0,0 +1,5 @@ +--- +'@shopify/polaris': patch +--- + +Reverted a change that caused `IndexTable` `onNavigation` not to work when `selectable` is `false` diff --git a/polaris-react/src/components/IndexTable/components/Row/Row.tsx b/polaris-react/src/components/IndexTable/components/Row/Row.tsx index 8ba4b5847f6..1bc75a0baed 100644 --- a/polaris-react/src/components/IndexTable/components/Row/Row.tsx +++ b/polaris-react/src/components/IndexTable/components/Row/Row.tsx @@ -142,7 +142,7 @@ export const Row = memo(function Row({ return; } - if (primaryLinkElement.current && !selectMode && selectable) { + if (primaryLinkElement.current && !selectMode) { isNavigating.current = true; const {ctrlKey, metaKey} = event.nativeEvent;