Browse Source

fix: Added events for sort modal

pull/6539/head
Muhammed Mustafa 1 year ago
parent
commit
9a85a97ad4
  1. 1
      packages/nc-gui/components/smartsheet/toolbar/CreateSort.vue
  2. 18
      packages/nc-gui/components/smartsheet/toolbar/SortListMenu.vue

1
packages/nc-gui/components/smartsheet/toolbar/CreateSort.vue

@ -96,6 +96,7 @@ const onArrowUp = () => {
<div <div
v-for="(option, index) in options" v-for="(option, index) in options"
:key="index" :key="index"
v-e="['c:sort:add:column:select']"
class="flex flex-row h-10 items-center gap-x-1.5 px-2.5 hover:bg-gray-100 cursor-pointer nc-sort-column-search-item" class="flex flex-row h-10 items-center gap-x-1.5 px-2.5 hover:bg-gray-100 cursor-pointer nc-sort-column-search-item"
:class="{ :class="{
'bg-gray-100': activeFieldIndex === index, 'bg-gray-100': activeFieldIndex === index,

18
packages/nc-gui/components/smartsheet/toolbar/SortListMenu.vue

@ -158,13 +158,20 @@ watch(open, () => {
<a-select-option <a-select-option
v-for="(option, j) of getSortDirectionOptions(getColumnUidtByID(sort.fk_column_id))" v-for="(option, j) of getSortDirectionOptions(getColumnUidtByID(sort.fk_column_id))"
:key="j" :key="j"
v-e="['c:sort:operation:select']"
:value="option.value" :value="option.value"
> >
<span>{{ option.text }}</span> <span>{{ option.text }}</span>
</a-select-option> </a-select-option>
</NcSelect> </NcSelect>
<NcButton type="text" size="small" class="nc-sort-item-remove-btn !max-w-8" @click.stop="deleteSort(sort, i)"> <NcButton
v-e="['c:sort:delete']"
type="text"
size="small"
class="nc-sort-item-remove-btn !max-w-8"
@click.stop="deleteSort(sort, i)"
>
<component :is="iconMap.deleteListItem" /> <component :is="iconMap.deleteListItem" />
</NcButton> </NcButton>
</template> </template>
@ -176,7 +183,14 @@ watch(open, () => {
:trigger="['click']" :trigger="['click']"
overlay-class-name="nc-toolbar-dropdown" overlay-class-name="nc-toolbar-dropdown"
> >
<NcButton class="!text-brand-500" type="text" size="small" @click.stop="showCreateSort = true"> <NcButton
v-e="['c:sort:add']"
class="!text-brand-500"
type="text"
size="small"
@click.stop="showCreateSort = true"
@click.stop="deleteSort(sort, i)"
>
<div class="flex gap-1 items-center"> <div class="flex gap-1 items-center">
<component :is="iconMap.plus" /> <component :is="iconMap.plus" />
<!-- Add Sort Option --> <!-- Add Sort Option -->

Loading…
Cancel
Save