From a2911999fd1bc52788ac22d1e9c5031903cfe628 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Tue, 7 Jan 2025 12:21:24 +0000 Subject: [PATCH] Adds in the util func demandCustomElement in ctor as suggested by Jacob --- packages/uui-copy/lib/uui-copy.element.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/uui-copy/lib/uui-copy.element.ts b/packages/uui-copy/lib/uui-copy.element.ts index 802b6b2b9..f98164b25 100644 --- a/packages/uui-copy/lib/uui-copy.element.ts +++ b/packages/uui-copy/lib/uui-copy.element.ts @@ -3,6 +3,7 @@ import { css, html, LitElement } from 'lit'; import { property } from 'lit/decorators.js'; import { UUIButtonElement } from '@umbraco-ui/uui-button/lib'; import { UUICopyEvent } from './UUICopyEvent'; +import { demandCustomElement } from '@umbraco-ui/uui-base/lib/utils'; /** * @summary A button to trigger text content to be copied to the clipboard @@ -72,6 +73,12 @@ export class UUICopyElement extends LitElement { @property({ type: Boolean }) compact = false; + constructor() { + super(); + demandCustomElement(this, 'uui-button'); + demandCustomElement(this, 'uui-icon'); + } + // Used to store the value that will be copied to the clipboard #valueToCopy = '';