Changes sorting direction on term edition form parent request. Solves overlapping css issue of autocomplete.

This commit is contained in:
Mateus Machado Luna 2019-10-31 15:56:42 -03:00
parent 811a86f065
commit 4f814b12d3
5 changed files with 5 additions and 4 deletions

View File

@ -144,7 +144,7 @@
:message="$i18n.get('info_help_parent_term')"/>
</label>
<b-autocomplete
id="tainacan-text-cover-page"
id="tainacan-add-parent-field"
:placeholder="$i18n.get('instruction_parent_term')"
:data="parentTerms"
field="name"

View File

@ -26,6 +26,7 @@
border-radius: 0px;
min-width: 6rem;
border: none;
z-index: 99;
.dropdown-content {
padding: 0px;

View File

@ -169,7 +169,7 @@
if (equal.length == this.inputs.length && this.metadatum.value.length <= equal.length)
return;
}
eventBus.$emit('input', {
itemId: this.metadatum.item.id,
metadatumId: this.metadatum.metadatum.id,

View File

@ -61,7 +61,7 @@
:message="$i18n.get('info_help_parent_term')"/>
</label>
<b-autocomplete
id="tainacan-text-cover-page"
id="tainacan-add-parent-field"
:placeholder="$i18n.get('instruction_parent_term')"
:data="parentTerms"
field="name"

View File

@ -296,7 +296,7 @@ export const clearTerms = ({ commit }) => {
// Used only on Term Edition form, for autocomplete searhc for parents
export const fetchPossibleParentTerms = ({ commit }, { taxonomyId, termId, search } ) => {
return new Promise((resolve, reject) => {
axios.tainacan.get('/taxonomy/' + taxonomyId + '/terms?searchterm=' + search + '&hierarchical=1&exclude_tree=' + termId + "&hideempty=0&offset=0&number=20")
axios.tainacan.get('/taxonomy/' + taxonomyId + '/terms?searchterm=' + search + '&hierarchical=1&exclude_tree=' + termId + "&hideempty=0&offset=0&number=20&order=asc")
.then(res => {
let parentTerms = res.data;
resolve( parentTerms );