From 6ab0bd77d11f2dd1d1f5c2560ff1fbb178d7ffa4 Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Fri, 17 Feb 2023 09:17:02 +0100 Subject: [PATCH] add properties to a sub-ul list --- .../shared/components/debug/debug.element.ts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/debug/debug.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/debug/debug.element.ts index 324d7b84d9..d4f23a9f0f 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/debug/debug.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/debug/debug.element.ts @@ -182,10 +182,11 @@ export class UmbDebug extends UmbLitElement { ${methodNames.map((methodName) => html`
  • ${methodName}
  • `)} - `); + ` + ); } - instanceTemplates.push(html`
  • Properties
  • `); + const props: TemplateResult[] = []; for (const key in instance) { if (key.startsWith('_')) { @@ -194,11 +195,20 @@ export class UmbDebug extends UmbLitElement { const value = instance[key]; if (typeof value === 'string') { - instanceTemplates.push(html`
  • ${key} = ${value}
  • `); + props.push(html`
  • ${key} = ${value}
  • `); } else { - instanceTemplates.push(html`
  • ${key} (${typeof value})
  • `); + props.push(html`
  • ${key} (${typeof value})
  • `); } } + + instanceTemplates.push(html` +
  • + Properties + +
  • + `); } else { instanceTemplates.push(html`
  • Context is a primitive with value: ${instance}
  • `); }