change mapper selection from dropbox to select

This commit is contained in:
Jacson Passold 2018-06-12 16:38:46 -03:00
parent 422de8f1be
commit cf7086f11a
1 changed files with 32 additions and 29 deletions

View File

@ -156,20 +156,17 @@
</section>
<section >
<div class="field is-grouped form-submit">
<b-dropdown id="mappers-options-dropdown">
<button
<b-select
id="mappers-options-dropdown"
class="button is-secondary"
slot="trigger">
<div>{{ $i18n.get('mappers') }}</div>
<b-icon icon="menu-down"/>
</button>
<b-dropdown-item
:key="metadatum_mapper.slug"
:placeholder="$i18n.get('mappers')">
<option
v-for="metadatum_mapper in metadatum_mappers"
:key="metadatum_mapper.slug"
@click="onSelectMetadataMapper(metadatum_mapper)">
{{ $i18n.get(metadatum_mapper.name) }}
</b-dropdown-item>
</b-dropdown>
</option>
</b-select>
<div
class="control"
v-if="mapper != '' && !isLoadingMetadatumMappers">
@ -430,6 +427,7 @@ export default {
this.openedMetadatumId = '';
},
onSelectMetadataMapper(metadatum_mapper) {
if(metadatum_mapper != '') {
this.isMapperMetadataLoading = true;
this.mapper = metadatum_mapper;
for (var k in metadatum_mapper.metadata) {
@ -449,6 +447,7 @@ export default {
}
this.isMapperMetadataLoading = false;
//console.log(JSON.stringify(this.mapperMetadata));
}
},
isMetadatumSelected(id) {
return this.mappedMetadata.indexOf(id) > -1;
@ -883,5 +882,9 @@ export default {
}
}
#mappers-options-dropdown {
background-color: transparent;
color: #fff;
}
</style>