Files
baserow/web-frontend/modules/database/components/view/grid/GridViewGroupByColumnSpan.vue
Davide Silvestri 479e616ee9 feat: add columns layout to grouped grid views (#6022)
* feat: add columns layout to grouped grid views

* test: strengthen Columns layout coverage

* fix: remove doubled vertical border on group column spans

The group-by divider already draws a full-height line at each level
boundary, so the span's own border-right rendered a second adjacent
line in the body but not in the header.

* chore: renumber group_by_layout migration after rebase

Develop added 0221 and 0222 in the meantime, so the branch migration
forked the graph into two leaf nodes.

* refactor: rename banner group layout to section
2026-09-17 17:50:14 +02:00

55 lines
1.4 KiB
Vue

<template>
<div
class="grid-view__group-span"
:style="{
top: span.y + 'px',
height: span.height + 'px',
left: left + 'px',
width: width + 'px',
}"
>
<div class="grid-view__group-cell grid-view__group-cell--sticky">
<div class="grid-view__group-value">
<span v-if="isEmptyValue" class="grid-view__group-value-empty">
{{ $t('gridViewGroupByBanner.emptyValue') }}
</span>
<component
:is="groupByComponent"
v-else-if="groupByComponent"
:field="groupByField"
:value="rowValueForGroup"
:workspace-id="workspaceId"
/>
<span v-else class="grid-view__group-value-text">
{{ fallbackValueText }}
</span>
</div>
<div class="grid-view__group-count">{{ span.rowCount }}</div>
</div>
</div>
</template>
<script>
import gridViewGroupByValue from '@baserow/modules/database/mixins/gridViewGroupByValue'
export default {
name: 'GridViewGroupByColumnSpan',
mixins: [gridViewGroupByValue],
props: {
span: { type: Object, required: true },
groupByField: { type: Object, default: null },
left: { type: Number, required: true },
width: { type: Number, required: true },
workspaceId: { type: null, default: null },
},
computed: {
groupPath() {
return this.span.path
},
groupDisplay() {
return this.span.display
},
},
}
</script>