Prevents null error when label is empty in checkbox modal. Hides item exposers for now on item page.

This commit is contained in:
Mateus Machado Luna 2018-12-12 11:28:51 -02:00
parent c79f1686f8
commit 501665dff4
3 changed files with 7 additions and 8 deletions

View File

@ -1399,7 +1399,7 @@ export default {
min-width: 30px !important;
padding: 0 !important;
z-index: 99;
margin-left: 10px !important;
margin-left: 12px !important;
.icon {
display: inherit;

View File

@ -55,7 +55,7 @@
type="checkbox">
<span class="check" />
<span class="control-label">
<span class="checkbox-label-text">{{ `${ limitChars(option.label) }` }}</span>
<span class="checkbox-label-text">{{ `${ (option.label? limitChars(option.label) : '') }` }}</span>
<span
v-if="isFilter && option.total_items != undefined"
class="has-text-gray">&nbsp;{{ "(" + option.total_items + ")" }}</span>
@ -217,7 +217,7 @@
type="checkbox">
<span class="check" />
<span class="control-label">
<span class="checkbox-label-text">{{ `${ option.name ? limitChars(option.name) : limitChars(option.label) }` }}</span>
<span class="checkbox-label-text">{{ `${ option.name ? limitChars(option.name) : (option.label ? limitChars(option.label) : '') }` }}</span>
<span
v-if="isFilter && option.total_items != undefined"
class="has-text-gray">
@ -229,7 +229,7 @@
v-else
v-model="selected"
:native-value="option.id ? (isNaN(Number(option.id)) ? option.id : Number(option.value)) : (isNaN(Number(option.value)) ? option.value : Number(option.value))">
{{ `${ option.name ? limitChars(option.name) : limitChars(option.label) }` }}
{{ `${ option.name ? limitChars(option.name) : (option.label ? limitChars(option.label) : '') }` }}
<span
v-if="isFilter && option.total_items != undefined"
class="has-text-gray">
@ -369,10 +369,9 @@
}
},
limitChars(label){
if(label.length > this.maxTextToShow){
if (label.length > this.maxTextToShow){
return label.slice(0, this.maxTextToShow)+'...';
}
return label;
},
beforePage(){

View File

@ -121,7 +121,7 @@
disabled/>
</b-field>
<!-- Exposers --------------------------------------------- -->
<div>
<!-- <div>
<b-loading :active.sync="isLoadingMetadatumMappers"/>
<div v-if="!isLoadingMetadatumMappers">
<b-collapse :open="false">
@ -183,7 +183,7 @@
</div>
</b-collapse>
</div>
</div>
</div> -->
<!-- Hook for extra Form options -->
<template