From b1a0efc7d60b300fd7ff0923eb215ea8f29b63bd Mon Sep 17 00:00:00 2001 From: Chloe Rice Date: Thu, 21 Mar 2024 18:31:05 -0400 Subject: [PATCH] =?UTF-8?q?[IndexTable.Row]=20Revert=20selectable=3Dfalse?= =?UTF-8?q?=20early=20return,=20which=20break=20on=E2=80=A6=20(#11773)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### WHAT is this pull request doing? This PR reverts a change made in #11763, unrelated to the bug fixed, that caused an unintended regression: breaking `onNavigation` behavior for unselectable tables. This needs to ship in a patch asap because it is live in v12.20.0. --- .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;