Browse Source

Merge pull request #3994 from nocodb/fix/3988-clear-cell

Fix: Grid view - remove clear cell option from context menu for virtual cells
pull/4001/head
Raju Udava 2 years ago committed by GitHub
parent
commit
538cef4438
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      packages/nc-gui/components/smartsheet/Grid.vue
  2. 9
      packages/nc-gui/pages/[projectType]/form/[viewId]/index/survey.vue

5
packages/nc-gui/components/smartsheet/Grid.vue

@ -579,7 +579,10 @@ watch([() => selected.row, () => selected.col], ([row, col]) => {
</a-menu-item>
<!-- Clear cell -->
<a-menu-item v-if="contextMenuTarget" @click="clearCell(contextMenuTarget)">
<a-menu-item
v-if="contextMenuTarget && !isVirtualCol(fields[contextMenuTarget.col])"
@click="clearCell(contextMenuTarget)"
>
<div v-e="['a:row:clear']" class="nc-project-menu-item">{{ $t('activity.clearCell') }}</div>
</a-menu-item>

9
packages/nc-gui/pages/[projectType]/form/[viewId]/index/survey.vue

@ -283,7 +283,8 @@ onMounted(() => {
"
type="submit"
class="uppercase scaling-btn prose-sm"
data-cy="nc-survey-form__btn-submit" @click="submitForm"
data-cy="nc-survey-form__btn-submit"
@click="submitForm"
>
{{ $t('general.submit') }}
</button>
@ -383,7 +384,8 @@ onMounted(() => {
: ''
"
class="p-0.5 flex items-center group color-transition"
data-cy="nc-survey-form__icon-prev" @click="goPrevious"
data-cy="nc-survey-form__icon-prev"
@click="goPrevious"
>
<MdiChevronLeft :class="isFirst ? 'text-gray-300' : 'group-hover:text-accent'" class="text-2xl md:text-md" />
</button>
@ -401,7 +403,8 @@ onMounted(() => {
: ''
"
class="p-0.5 flex items-center group color-transition"
data-cy="nc-survey-form__icon-next" @click="goNext"
data-cy="nc-survey-form__icon-next"
@click="goNext"
>
<MdiChevronRight
:class="[isLast || v$.localState[field.title]?.$error ? 'text-gray-300' : 'group-hover:text-accent']"

Loading…
Cancel
Save