diff --git a/docs/resources/changelog.md b/docs/resources/changelog.md index e5fdd8ef4..d9e930d04 100644 --- a/docs/resources/changelog.md +++ b/docs/resources/changelog.md @@ -14,6 +14,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis - Fixed a bug where tag names weren't being generated in `vscode.html-custom-data.json` [#593](https://github.com/shoelace-style/shoelace/pull/593) - Fixed a bug in `` where the tooltip wouldn't reposition when content changed - Fixed a bug in `` where focusing on a filled control showed the wrong focus ring +- Fixed a bug where setting `value` initially on `` didn't work in React [#602](https://github.com/shoelace-style/shoelace/issues/602) - Updated filled inputs to have the same appearance when focused - Updated `color` dependency from 3.1.3 to 4.0.2 - Updated ``, ``, ``, and `` to work like other localized components diff --git a/src/components/color-picker/color-picker.ts b/src/components/color-picker/color-picker.ts index 151a3995b..cbd10817d 100644 --- a/src/components/color-picker/color-picker.ts +++ b/src/components/color-picker/color-picker.ts @@ -141,9 +141,7 @@ export default class SlColorPicker extends LitElement { /** The locale to render the component in. */ @property() lang: string; - connectedCallback() { - super.connectedCallback(); - + firstUpdated() { if (!this.setColor(this.value)) { this.setColor(`#ffff`); }