|
|
|
@ -251,19 +251,14 @@ watch(meta, async () => {
|
|
|
|
|
/> |
|
|
|
|
<div |
|
|
|
|
v-else |
|
|
|
|
:class="{ ' min-w-[400px]': _groupBy.length }" |
|
|
|
|
class="flex flex-col bg-white overflow-auto nc-group-by-list menu-filter-dropdown max-h-[max(80vh,500px)] py-6 pl-6" |
|
|
|
|
class="flex flex-col bg-white overflow-auto nc-group-by-list menu-filter-dropdown max-h-[max(80vh,500px)] min-w-102 pt-2 pb-2 pl-4" |
|
|
|
|
data-testid="nc-group-by-menu" |
|
|
|
|
> |
|
|
|
|
<div |
|
|
|
|
class="group-by-grid pb-1 max-h-100 nc-scrollbar-md pr-5" |
|
|
|
|
:class="{ 'mb-2': availableColumns.length && fieldsToGroupBy.length > _groupBy.length && _groupBy.length < 3 }" |
|
|
|
|
@click.stop |
|
|
|
|
> |
|
|
|
|
<div class="group-by-grid max-h-100 nc-scrollbar-thing pr-4 py-2" @click.stop> |
|
|
|
|
<template v-for="[i, group] of Object.entries(_groupBy)" :key="`grouped-by-${group.fk_column_id}`"> |
|
|
|
|
<LazySmartsheetToolbarFieldListAutoCompleteDropdown |
|
|
|
|
v-model="group.fk_column_id" |
|
|
|
|
class="caption nc-sort-field-select" |
|
|
|
|
class="caption nc-sort-field-select w-44 flex flex-grow" |
|
|
|
|
:columns="fieldsToGroupBy" |
|
|
|
|
:allow-empty="true" |
|
|
|
|
@change="saveGroupBy" |
|
|
|
@ -296,10 +291,10 @@ watch(meta, async () => {
|
|
|
|
|
</a-select-option> |
|
|
|
|
</NcSelect> |
|
|
|
|
|
|
|
|
|
<a-tooltip placement="right" title="Remove"> |
|
|
|
|
<a-tooltip placement="right" title="Remove" class="flex-none min-w-40"> |
|
|
|
|
<NcButton |
|
|
|
|
v-e="['c:group-by:remove']" |
|
|
|
|
class="nc-group-by-item-remove-btn" |
|
|
|
|
class="nc-group-by-item-remove-btn min-w-40" |
|
|
|
|
size="small" |
|
|
|
|
type="text" |
|
|
|
|
@click.stop="removeFieldFromGroupBy(i)" |
|
|
|
@ -317,7 +312,7 @@ watch(meta, async () => {
|
|
|
|
|
> |
|
|
|
|
<NcButton |
|
|
|
|
v-e="['c:group-by:add']" |
|
|
|
|
class="nc-add-group-by-btn !text-brand-500" |
|
|
|
|
class="nc-add-group-by-btn !text-brand-500 mt-1 mb-2" |
|
|
|
|
style="width: fit-content" |
|
|
|
|
size="small" |
|
|
|
|
type="text" |
|
|
|
@ -346,7 +341,7 @@ watch(meta, async () => {
|
|
|
|
|
<style scoped> |
|
|
|
|
.group-by-grid { |
|
|
|
|
display: grid; |
|
|
|
|
grid-template-columns: auto 150px 22px; |
|
|
|
|
@apply gap-[12px]; |
|
|
|
|
grid-template-columns: auto 150px auto; |
|
|
|
|
@apply gap-x-2 gap-y-3; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|