Hide 'NULL' group labels in oh-label-item, second take (#1435)

Hides 'NULL' labels in oh-label-item while not preventing display of labels for Group where the item to display option has been set.

Signed-off-by: Gautier Taravella <tarag@mailbox.org>
pull/1454/head
Gautier 2022-07-11 18:49:43 +02:00 committed by GitHub
parent 7409f60296
commit 5be19352e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 4 deletions

View File

@ -105,9 +105,6 @@ export default function itemDefaultListComponent (item, footer) {
if (text) component.config.footer = text
}
if (!item.category) component.config.fallbackIconToInitial = true
if (component.component === 'oh-label-item' && item.type.indexOf('Group') === 0 && !item.groupType && component.config.after === undefined) {
component.config.after = null // Hide 'NULL' label for standard (non-typed) groups with no 'after' metadata defined
}
return component
}

View File

@ -1,6 +1,6 @@
<template>
<oh-list-item :context="context">
<div slot="after" v-if="config.after === undefined">
<div slot="after" v-if="(config.after === undefined) && (context.store[config.item].state !== 'NULL')">
{{ context.store[config.item].displayState || context.store[config.item].state }}
</div>
</oh-list-item>