[ui] show IS/LBL in editable tables

feat/vaults
Tomáš Mládek 2022-01-21 15:57:53 +01:00
parent f2440742d8
commit 095b14516e
1 changed files with 12 additions and 6 deletions

View File

@ -7,7 +7,7 @@
import { setContext } from "svelte";
import { writable } from "svelte/store";
import type { UpEntry } from "upend";
import Spinner from "./utils/Spinner.svelte";
import Spinner from "./utils/Spinner.svelte";
export let address: string;
export let index: number | undefined;
@ -74,10 +74,16 @@ import Spinner from "./utils/Spinner.svelte";
});
typedAttributes = typedAttributes;
untypedAttributes = untypedAttributes.filter(
(entry) => !["IS", "LBL"].includes(entry.attribute)
);
untypedAttributes = untypedAttributes;
}
$: filteredUntypedAttributes = untypedAttributes.filter(
(entry) => !["IS", "LBL"].includes(entry.attribute)
);
$: currentUntypedAttributes = editable
? untypedAttributes
: filteredUntypedAttributes;
</script>
<div class="inspect">
@ -102,12 +108,12 @@ import Spinner from "./utils/Spinner.svelte";
/>
{/each}
{#if untypedAttributes.length > 0 || editable}
{#if currentUntypedAttributes.length > 0 || editable}
<AttributeView
title="Other attributes"
{editable}
{address}
entries={untypedAttributes}
entries={currentUntypedAttributes}
on:changed={revalidate}
/>
{/if}