UX(taghint): don't show deleted tags if they are not present on the object in the first place

This commit is contained in:
Pieter Vander Vennet 2025-06-25 15:43:00 +02:00
parent 87358505e9
commit 73d40206b4

View file

@ -10,19 +10,19 @@
* Depending on the options, it'll link through to the wiki or might be completely hidden
*/
export let tags: TagsFilter[]
export let currentProperties: Record<string, string> = {}
export let currentProperties: Record<string, string> = undefined
</script>
{#if tags?.length > 0}
<div class="flex flex-wrap gap-x-4">
{#each tags as tag}
<div class="break-words" style="word-break: break-word">
{#if tag["value"] === ""}
{#if tag["value"] === "" && currentProperties?.[tag["key"]]}
<del>
{tag["key"]}
</del>
{:else}
<FromHtml src={tag.asHumanString(true, false, currentProperties)} />
<FromHtml src={tag.asHumanString(true, false, currentProperties ?? {})} />
{/if}
</div>
{/each}