|
|
|
@ -66,7 +66,7 @@ watch(
|
|
|
|
|
{ immediate: true }, |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
const isAnyFieldHidden = computed(() => filteredFieldList.value?.some((field) => !field.show)) |
|
|
|
|
const numberOfHiddenFields = computed(() => filteredFieldList.value?.filter((field) => !field.show)?.length) |
|
|
|
|
|
|
|
|
|
const onMove = (_event: { moved: { newIndex: number } }) => { |
|
|
|
|
// todo : sync with server |
|
|
|
@ -138,7 +138,7 @@ useMenuCloseOnEsc(open)
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
|
<a-dropdown v-model:visible="open" :trigger="['click']" overlay-class-name="nc-dropdown-fields-menu"> |
|
|
|
|
<div :class="{ 'nc-badge nc-active-btn': isAnyFieldHidden }"> |
|
|
|
|
<div :class="{ 'nc-active-btn': numberOfHiddenFields }"> |
|
|
|
|
<a-button v-e="['c:fields']" class="nc-fields-menu-btn nc-toolbar-btn" :disabled="isLocked"> |
|
|
|
|
<div class="flex items-center gap-1"> |
|
|
|
|
<MdiEyeOffOutline /> |
|
|
|
@ -147,6 +147,8 @@ useMenuCloseOnEsc(open)
|
|
|
|
|
<span class="text-capitalize !text-sm font-weight-normal">{{ $t('objects.fields') }}</span> |
|
|
|
|
|
|
|
|
|
<MdiMenuDown class="text-grey" /> |
|
|
|
|
|
|
|
|
|
<span class="nc-count-badge" v-if="numberOfHiddenFields">{{ numberOfHiddenFields }}</span> |
|
|
|
|
</div> |
|
|
|
|
</a-button> |
|
|
|
|
</div> |
|
|
|
@ -238,4 +240,5 @@ useMenuCloseOnEsc(open)
|
|
|
|
|
:deep(.ant-checkbox) { |
|
|
|
|
@apply top-auto; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
</style> |
|
|
|
|