From 40ff793fa45def634964dc535ed0a3ec82ebe788 Mon Sep 17 00:00:00 2001 From: Marcel Bensch Date: Tue, 10 Aug 2021 15:45:14 -0500 Subject: [PATCH] Support selected prop for navigation items without url Update UNRELEASED.md --- UNRELEASED.md | 1 + src/components/Navigation/components/Item/Item.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/UNRELEASED.md b/UNRELEASED.md index 33b84027ace..04854f7d3c5 100644 --- a/UNRELEASED.md +++ b/UNRELEASED.md @@ -23,6 +23,7 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f - Bring back borders on the `IndexTable` sticky cells ([#4150](https://github.com/Shopify/polaris-react/pull/4150)) - Adjust `IndexTable` sticky z-index to avoid collisions with focused `TextField` ([#4150](https://github.com/Shopify/polaris-react/pull/4150)) - Adjust `IndexTable` rows to have a grey hover state when unselected ([#4359](https://github.com/Shopify/polaris-react/pull/4359)) +- Properly support `selected` prop for `Navigation.Item` when `url` prop is not specified ([#4375](https://github.com/Shopify/polaris-react/pull/4375)) ### Documentation diff --git a/src/components/Navigation/components/Item/Item.tsx b/src/components/Navigation/components/Item/Item.tsx index 5262e30c417..ecd7c16af1f 100644 --- a/src/components/Navigation/components/Item/Item.tsx +++ b/src/components/Navigation/components/Item/Item.tsx @@ -182,6 +182,7 @@ export function Item({ styles.Item, disabled && styles['Item-disabled'], keyFocused && styles.keyFocused, + selectedOverride && styles['Item-selected'], ); return (