From ef65f0e7be0b4beee517b3ca3d7a84c16632e78e Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Wed, 20 Jan 2021 12:09:48 -0500 Subject: [PATCH] Fix menu toggle when clearing tags --- docs/getting-started/changelog.md | 1 + src/components/select/select.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/getting-started/changelog.md b/docs/getting-started/changelog.md index 391ba1b0d..33f1b7586 100644 --- a/docs/getting-started/changelog.md +++ b/docs/getting-started/changelog.md @@ -8,6 +8,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis ## Next +- Fixed a bug in `sl-select` where removing a tag would toggle the dropdown - Updated `sl-menu-item` focus styles ## 2.0.0-beta.26 diff --git a/src/components/select/select.tsx b/src/components/select/select.tsx index a2e8d9b2a..831cd1856 100644 --- a/src/components/select/select.tsx +++ b/src/components/select/select.tsx @@ -301,7 +301,7 @@ export class Select { const clearButton = path.find(el => { if (el instanceof HTMLElement) { const element = el as HTMLElement; - return element.getAttribute('part') === 'clear-button'; + return element.classList.contains('tag__clear'); } });