Fixes bug where multivalored relationship metada was initially filled with several values.
This commit is contained in:
parent
4effd863a8
commit
43fb79a6f9
|
@ -96,7 +96,7 @@ export default {
|
|||
&:hover {
|
||||
cursor: pointer;
|
||||
.image, .file-placeholder {
|
||||
transform: scale(1.1);
|
||||
transform: scale(1.05);
|
||||
}
|
||||
}
|
||||
.image-wrapper {
|
||||
|
|
|
@ -22,10 +22,9 @@
|
|||
export default {
|
||||
created(){
|
||||
let collectionId = ( this.metadatum && this.metadatum.metadatum.metadata_type_options.collection_id ) ? this.metadatum.metadatum.metadata_type_options.collection_id : this.collection_id;
|
||||
if( this.metadatum.value ){
|
||||
if( this.metadatum.value && (Array.isArray( this.metadatum.value ) ? this.metadatum.value.length > 0 : true )){
|
||||
let query = qs.stringify({ postin: ( Array.isArray( this.metadatum.value ) ) ? this.metadatum.value : [ this.metadatum.value ] });
|
||||
|
||||
axios.get('/collection/'+collectionId+'/items?' + query + '?nopaging=1')
|
||||
axios.get('/collection/'+collectionId+'/items?' + query + '&nopaging=1')
|
||||
.then( res => {
|
||||
for (let item of res.data) {
|
||||
this.selected.push({ label: item.title, value: item.id, img: '' });
|
||||
|
|
Loading…
Reference in New Issue