diff options
author | Grigory Vodyanov <scratchx@gmx.com> | 2024-04-15 18:53:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-15 18:53:28 +0200 |
commit | 0c91ff405131b77da593de25d41f85037b8665a9 (patch) | |
tree | a01d84c41d0013b5b37d99af82238e581743c387 | |
parent | 235833babd845e51cff0e336187684c779179283 (diff) | |
parent | 0966750e4ea30412b0ecc6cc93263882ae825c37 (diff) |
Merge pull request #3752 from nextcloud/Enh/Enhance-group-information
Enh/Enhance group information display
-rw-r--r-- | src/components/Properties/PropertyGroups.vue | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/components/Properties/PropertyGroups.vue b/src/components/Properties/PropertyGroups.vue index 55abd064..d00a9d6b 100644 --- a/src/components/Properties/PropertyGroups.vue +++ b/src/components/Properties/PropertyGroups.vue @@ -34,14 +34,13 @@ <!-- multiselect taggable groups --> <div class="property__value"> - <NcSelect v-if="!showAsText" + <NcSelect v-if="!isReadOnly" v-model="localValue" :options="groups" :no-wrap="true" :placeholder="t('contacts', 'Add contact in group')" :multiple="true" :close-on-select="false" - :disabled="isReadOnly" :clearable="true" :deselect-from-dropdown="true" :taggable="true" @@ -58,9 +57,15 @@ <span>{{ t('contacts', 'No results') }}</span> </template> </NcSelect> - <p v-else> - {{ localValue.length === 0 ? t('contacts','None'): localValue.toString() }} - </p> + <div v-else> + <span v-if="localValue.length === 0">{{ t('contacts','None') }}</span> + + <div v-else class="group__list"> + <span v-for="(group, index) in localValue" :key="index"> + {{ group }}{{ index === (localValue.length - 1) ? '' : ', ' }} + </span> + </div> + </div> </div> <!-- empty actions to keep the layout --> @@ -162,3 +167,10 @@ export default { }, } </script> + +<style lang="scss" scoped> +.group__list { + display: flex; + flex-wrap: wrap; +} +</style> |