Skip to content

Commit

Permalink
Enh/Enhance group information display
Browse files Browse the repository at this point in the history
Signed-off-by: Grigory V <[email protected]>
  • Loading branch information
GVodyanov committed Dec 20, 2023
1 parent 72b0ea3 commit 619cb2c
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions src/components/Properties/PropertyGroups.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -55,9 +54,15 @@
{{ t('contacts', 'No results') }}
</span>
</NcSelect>
<p v-else>
{{ localValue.length === 0 ? t('contacts','None'): localValue.toString() }}
</p>
<div v-else>

Check warning on line 57 in src/components/Properties/PropertyGroups.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Properties/PropertyGroups.vue#L57

Added line #L57 was not covered by tests
<span v-if="localValue.length === 0">{{ t('contacts','None') }}</span>

<div class="group__list">
<span v-for="(group, index) in localValue">

Check failure on line 61 in src/components/Properties/PropertyGroups.vue

View workflow job for this annotation

GitHub Actions / eslint

Elements in iteration expect to have 'v-bind:key' directives
{{ group }}{{ index === (localValue.length - 1) ? '' : ',&nbsp;' }}

Check failure on line 62 in src/components/Properties/PropertyGroups.vue

View workflow job for this annotation

GitHub Actions / eslint

Expected indentation of 7 tabs but found 6 tabs
</span>
</div>
</div>
</div>

<!-- empty actions to keep the layout -->
Expand Down Expand Up @@ -159,3 +164,10 @@ export default {
},
}
</script>

<style lang="scss" scoped>
.group__list {
display: flex;
flex-wrap: wrap;
}
</style>

0 comments on commit 619cb2c

Please sign in to comment.