Have metric render 0

This commit is contained in:
rijkvanzanten
2021-06-24 18:58:47 -04:00
parent 013b6a9702
commit 740faf143a
3 changed files with 3 additions and 2 deletions

View File

@@ -12,7 +12,7 @@
:model-value="value"
:disabled="disabled"
:items="selectItems"
:placeholder="t('select_a_field')"
:placeholder="placeholder || t('select_a_field')"
/>
</template>

View File

@@ -94,6 +94,7 @@ export default definePanel({
options: {
collectionField: 'collection',
allowPrimaryKey: true,
placeholder: '$t:primary_key',
},
width: 'half',
},

View File

@@ -72,7 +72,7 @@ export default defineComponent({
);
const displayValue = computed(() => {
if (!metric.value) return null;
if (metric.value === null || metric.value === undefined) return null;
if (props.options.abbreviate) {
return abbreviateNumber(metric.value, props.options.decimals);