From 7b907bc326d94c2b29bed8d35a9225c35f3921ea Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Tue, 9 Mar 2021 12:52:36 -0500 Subject: [PATCH] fixes #357 --- docs/getting-started/changelog.md | 1 + src/components/details/details.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/getting-started/changelog.md b/docs/getting-started/changelog.md index 4989d0501..c4ff3de7f 100644 --- a/docs/getting-started/changelog.md +++ b/docs/getting-started/changelog.md @@ -9,6 +9,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis ## Nexts - Add touch support to `sl-rating` [#362](https://github.com/shoelace-style/shoelace/pull/362) +- Fixed a bug where the `open` attribute on `sl-details` would prevent it from opening [#357](https://github.com/shoelace-style/shoelace/issues/357) ## 2.0.0-beta.30 diff --git a/src/components/details/details.ts b/src/components/details/details.ts index eed6ffabf..209de6a96 100644 --- a/src/components/details/details.ts +++ b/src/components/details/details.ts @@ -162,7 +162,9 @@ export default class SlDetails extends LitElement { @watch('open') handleOpenChange() { - this.open ? this.show() : this.hide(); + if (this.details) { + this.open ? this.show() : this.hide(); + } } render() {