Prevent a bug that cause a not correct exhibition of filter chechbox options in filter sidebar
This commit is contained in:
parent
0ac11c2a70
commit
432b5a98d2
|
@ -200,6 +200,7 @@
|
|||
}
|
||||
},
|
||||
created() {
|
||||
console.log(this);
|
||||
if(this.isTaxonomy) {
|
||||
this.getOptionChildren();
|
||||
} else {
|
||||
|
|
|
@ -114,8 +114,24 @@
|
|||
this.metadatum_object.metadata_type_options.collection_id : this.collection_id;
|
||||
|
||||
promise = this.getValuesRelationship( collectionTarget, null, [], 0, this.filter.max_options);
|
||||
|
||||
promise.then(() => {
|
||||
if(this.options.length > this.filter.max_options){
|
||||
this.options.splice(this.filter.max_options);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$console.error(error);
|
||||
})
|
||||
} else {
|
||||
promise = this.getValuesPlainText( this.metadatum, null, this.isRepositoryLevel, [], 0, this.filter.max_options );
|
||||
|
||||
promise.then(() => {
|
||||
if(this.options.length > this.filter.max_options){
|
||||
this.options.splice(this.filter.max_options);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$console.error(error);
|
||||
})
|
||||
}
|
||||
|
||||
promise.then(() => {
|
||||
|
|
|
@ -150,6 +150,10 @@
|
|||
}
|
||||
|
||||
if(this.filter.max_options && result.length >= this.filter.max_options){
|
||||
if(this.options.length > this.filter.max_options){
|
||||
this.options.splice(this.filter.max_options);
|
||||
}
|
||||
|
||||
let seeMoreLink = `<a style="font-size: 12px;"> ${ this.$i18n.get('label_view_all') } </a>`;
|
||||
result[this.filter.max_options-1].seeMoreLink = seeMoreLink;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue