Fixes TagInput filter not working on Repository Level.

This commit is contained in:
Mateus Machado Luna 2018-06-08 08:48:56 -03:00
parent a8f0a99d0b
commit 457f481dfe
1 changed files with 4 additions and 3 deletions

View File

@ -25,7 +25,7 @@
let in_route = '/collection/' + this.collection + '/fields/' + this.field;
if(this.isRepositoryLevel){
in_route = '/fields';
in_route = '/fields/' + this.field;
}
axios.get(in_route)
@ -83,8 +83,9 @@
let promise = null;
this.options = [];
const q = query;
axios.get('/collection/'+ this.collection +'/fields/' + this.field)
const endpoint = this.isRepositoryLevel ? '/fields/' + this.field : '/collection/'+ this.collection +'/fields/' + this.field;
axios.get(endpoint)
.then( res => {
let field = res.data;
promise = this.getValuesCategory( field.field_type_options.taxonomy_id, q );