mirror of https://github.com/nextcloud/contacts
Enh/Enhance group information display
Signed-off-by: Grigory V <scratchx@gmx.com> Fix/avoid empty div Co-authored-by: Hamza <40746210+hamza221@users.noreply.github.com> Signed-off-by: Grigory V <scratchx@gmx.com> Fix lint complaints Signed-off-by: Grigory Vodyanov <scratchx@gmx.com> Enh/Enhance group information display
This commit is contained in:
parent
efee821a7e
commit
0966750e4e
|
@ -34,14 +34,13 @@
|
||||||
|
|
||||||
<!-- multiselect taggable groups -->
|
<!-- multiselect taggable groups -->
|
||||||
<div class="property__value">
|
<div class="property__value">
|
||||||
<NcSelect v-if="!showAsText"
|
<NcSelect v-if="!isReadOnly"
|
||||||
v-model="localValue"
|
v-model="localValue"
|
||||||
:options="groups"
|
:options="groups"
|
||||||
:no-wrap="true"
|
:no-wrap="true"
|
||||||
:placeholder="t('contacts', 'Add contact in group')"
|
:placeholder="t('contacts', 'Add contact in group')"
|
||||||
:multiple="true"
|
:multiple="true"
|
||||||
:close-on-select="false"
|
:close-on-select="false"
|
||||||
:disabled="isReadOnly"
|
|
||||||
:clearable="true"
|
:clearable="true"
|
||||||
:deselect-from-dropdown="true"
|
:deselect-from-dropdown="true"
|
||||||
:taggable="true"
|
:taggable="true"
|
||||||
|
@ -58,9 +57,15 @@
|
||||||
<span>{{ t('contacts', 'No results') }}</span>
|
<span>{{ t('contacts', 'No results') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</NcSelect>
|
</NcSelect>
|
||||||
<p v-else>
|
<div v-else>
|
||||||
{{ localValue.length === 0 ? t('contacts','None'): localValue.toString() }}
|
<span v-if="localValue.length === 0">{{ t('contacts','None') }}</span>
|
||||||
</p>
|
|
||||||
|
<div v-else class="group__list">
|
||||||
|
<span v-for="(group, index) in localValue" :key="index">
|
||||||
|
{{ group }}{{ index === (localValue.length - 1) ? '' : ', ' }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- empty actions to keep the layout -->
|
<!-- empty actions to keep the layout -->
|
||||||
|
@ -162,3 +167,10 @@ export default {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.group__list {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue