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