diff --git a/apps/app/src/lib/components/HominioDB.svelte b/apps/app/src/lib/components/HominioDB.svelte index c43fe89..4103288 100644 --- a/apps/app/src/lib/components/HominioDB.svelte +++ b/apps/app/src/lib/components/HominioDB.svelte @@ -228,7 +228,6 @@ diff --git a/apps/app/src/lib/components/Properties.svelte b/apps/app/src/lib/components/Properties.svelte index 723a79b..c20a946 100644 --- a/apps/app/src/lib/components/Properties.svelte +++ b/apps/app/src/lib/components/Properties.svelte @@ -3,7 +3,6 @@ const dispatch = createEventDispatcher(); export let properties: any; - export let required: string[] = []; export let path: string[] = []; export let expandedProperties: string[] = []; @@ -18,12 +17,11 @@ return expandedProperties.includes(propertyPath); } - function renderProperties(properties: any, required: string[] = [], path: string[] = []) { + function renderProperties(properties: any, path: string[] = []) { return Object.entries(properties).map(([key, value]) => ({ key, value, - isObj: typeof value === 'object' && value !== null && value.type === 'object', - isRequired: required.includes(key), + isObj: typeof value === 'object' && value !== null, path: [...path, key].join('.') })); } @@ -33,7 +31,7 @@ $: { console.log('Properties: Rendered properties changed', properties); console.log('Properties: Current expandedProperties', expandedProperties); - renderedProperties = renderProperties(properties, required, path); + renderedProperties = renderProperties(properties, path); } @@ -43,14 +41,11 @@
- {prop.isObj ? 'object' : prop.value.type} + {typeof prop.value} {prop.key} - {#if prop.isRequired} - * - {/if} {#if prop.isObj}
{/each} @@ -69,8 +64,7 @@ {#each renderedProperties as prop (prop.path)} {#if prop.isObj && isExpanded(prop.path)}