Fixing issue discovered by cypress test case and updating dynamic variable view to hide table when there are none.

This commit is contained in:
mike12345567 2022-01-04 14:41:11 +00:00
parent 18ff7a9cfb
commit e32869b100
2 changed files with 17 additions and 14 deletions

View File

@ -36,16 +36,19 @@
}
</script>
<Table
on:click={({ detail }) => onClick(detail)}
schema={dynamicVariableSchema}
data={dynamicVariables}
allowEditColumns={false}
allowEditRows={false}
allowSelectRows={false}
customRenderers={[
{ column: "name", component: BoldRenderer },
{ column: "value", component: CodeRenderer },
]}
/>
<Body size="S" />
{#if dynamicVariables.length > 0}
<Table
on:click={({ detail }) => onClick(detail)}
schema={dynamicVariableSchema}
data={dynamicVariables}
allowEditColumns={false}
allowEditRows={false}
allowSelectRows={false}
customRenderers={[
{ column: "name", component: BoldRenderer },
{ column: "value", component: CodeRenderer },
]}
/>
{:else}
<Body size="S"><i>No dynamic variables specified.</i></Body>
{/if}

View File

@ -123,7 +123,7 @@
rows,
info,
schema,
rowsLength: rows.length,
rowsLength: rows?.length,
// Undocumented properties. These aren't supposed to be used in builder
// bindings, but are used internally by other components