Browse Source

fix: review changes

pull/7298/head
Ramesh Mane 10 months ago
parent
commit
291532a651
  1. 6
      packages/nc-gui/components/cell/Currency.vue
  2. 6
      packages/nc-gui/components/cell/Decimal.vue
  3. 6
      packages/nc-gui/components/cell/Duration.vue
  4. 6
      packages/nc-gui/components/cell/Email.vue
  5. 6
      packages/nc-gui/components/cell/Integer.vue
  6. 6
      packages/nc-gui/components/cell/Percent.vue
  7. 6
      packages/nc-gui/components/cell/PhoneNumber.vue
  8. 2
      packages/nc-gui/components/cell/RichText.vue
  9. 4
      packages/nc-gui/components/cell/Text.vue
  10. 6
      packages/nc-gui/components/cell/Url.vue

6
packages/nc-gui/components/cell/Currency.vue

@ -78,10 +78,8 @@ onMounted(() => {
:ref="focus" :ref="focus"
v-model="vModel" v-model="vModel"
type="number" type="number"
class="w-full h-full text-sm border-none rounded-md px-0 py-1 outline-none focus:outline-none focus:ring-0" class="w-full h-full text-sm border-none rounded-md py-1 outline-none focus:outline-none focus:ring-0"
:class="{ :class="isExpandedFormOpen ? 'px-2' : 'px-0'"
'!px-2': isExpandedFormOpen,
}"
:placeholder="isEditColumn ? $t('labels.optional') : ''" :placeholder="isEditColumn ? $t('labels.optional') : ''"
@blur="submitCurrency" @blur="submitCurrency"
@keydown.down.stop @keydown.down.stop

6
packages/nc-gui/components/cell/Decimal.vue

@ -94,10 +94,8 @@ watch(isExpandedFormOpen, () => {
v-if="editEnabled" v-if="editEnabled"
:ref="focus" :ref="focus"
v-model="vModel" v-model="vModel"
class="outline-none px-0 py-1 border-none rounded-md w-full h-full !text-sm" class="outline-none py-1 border-none rounded-md w-full h-full !text-sm"
:class="{ :class="isExpandedFormOpen ? 'px-2' : 'px-0'"
'!px-2': isExpandedFormOpen,
}"
type="number" type="number"
:step="precision" :step="precision"
:placeholder="isEditColumn ? $t('labels.optional') : ''" :placeholder="isEditColumn ? $t('labels.optional') : ''"

6
packages/nc-gui/components/cell/Duration.vue

@ -92,10 +92,8 @@ const focus: VNodeRef = (el) => !isExpandedFormOpen.value && !isEditColumn.value
v-if="editEnabled" v-if="editEnabled"
:ref="focus" :ref="focus"
v-model="localState" v-model="localState"
class="w-full !border-none !outline-none px-0 py-1" class="w-full !border-none !outline-none py-1"
:class="{ :class="isExpandedFormOpen ? 'px-2' : 'px-0'"
'!px-2': isExpandedFormOpen,
}"
:placeholder="durationPlaceholder" :placeholder="durationPlaceholder"
@blur="submitDuration" @blur="submitDuration"
@keypress="checkDurationFormat($event)" @keypress="checkDurationFormat($event)"

6
packages/nc-gui/components/cell/Email.vue

@ -70,10 +70,8 @@ watch(
v-if="editEnabled" v-if="editEnabled"
:ref="focus" :ref="focus"
v-model="vModel" v-model="vModel"
class="w-full outline-none text-sm px-0 py-1" class="w-full outline-none text-sm py-1"
:class="{ :class="isExpandedFormOpen ? 'px-2' : 'px-0'"
'!px-2': isExpandedFormOpen,
}"
:placeholder="isEditColumn ? $t('labels.optional') : ''" :placeholder="isEditColumn ? $t('labels.optional') : ''"
@blur="editEnabled = false" @blur="editEnabled = false"
@keydown.down.stop @keydown.down.stop

6
packages/nc-gui/components/cell/Integer.vue

@ -85,10 +85,8 @@ function onKeyDown(e: any) {
v-if="editEnabled" v-if="editEnabled"
:ref="focus" :ref="focus"
v-model="vModel" v-model="vModel"
class="outline-none px-0 py-1 border-none w-full h-full text-sm" class="outline-none py-1 border-none w-full h-full text-sm"
:class="{ :class="isExpandedFormOpen ? 'px-2' : 'px-0'"
'!px-2': isExpandedFormOpen,
}"
type="number" type="number"
style="letter-spacing: 0.06rem" style="letter-spacing: 0.06rem"
:placeholder="isEditColumn ? $t('labels.optional') : ''" :placeholder="isEditColumn ? $t('labels.optional') : ''"

6
packages/nc-gui/components/cell/Percent.vue

@ -121,10 +121,8 @@ const onTabPress = (e: KeyboardEvent) => {
v-if="editEnabled" v-if="editEnabled"
:ref="focus" :ref="focus"
v-model="vModel" v-model="vModel"
class="w-full !text-sm !border-none !outline-none focus:ring-0 text-base px-0 py-1" class="w-full !text-sm !border-none !outline-none focus:ring-0 text-base py-1"
:class="{ :class="isExpandedFormOpen ? 'px-2' : 'px-0'"
'!px-2': isExpandedFormOpen,
}"
type="number" type="number"
:placeholder="isEditColumn ? $t('labels.optional') : ''" :placeholder="isEditColumn ? $t('labels.optional') : ''"
@blur="onBlur" @blur="onBlur"

6
packages/nc-gui/components/cell/PhoneNumber.vue

@ -62,10 +62,8 @@ watch(
v-if="editEnabled" v-if="editEnabled"
:ref="focus" :ref="focus"
v-model="vModel" v-model="vModel"
class="w-full outline-none text-sm px-0 py-1" class="w-full outline-none text-sm py-1"
:class="{ :class="isExpandedFormOpen ? 'px-2' : 'px-0'"
'!px-2': isExpandedFormOpen,
}"
:placeholder="isEditColumn ? $t('labels.optional') : ''" :placeholder="isEditColumn ? $t('labels.optional') : ''"
@blur="editEnabled = false" @blur="editEnabled = false"
@keydown.down.stop @keydown.down.stop

2
packages/nc-gui/components/cell/RichText.vue

@ -156,7 +156,7 @@ watch(editorDom, () => {
<template> <template>
<div <div
class="h-full focus:!outline-none focus-visible:!outline-none" class="h-full focus:outline-none"
:class="{ :class="{
'flex flex-col flex-grow nc-rich-text-full': props.fullMode, 'flex flex-col flex-grow nc-rich-text-full': props.fullMode,
'nc-rich-text-embed flex flex-col pl-1 w-full': !props.fullMode, 'nc-rich-text-embed flex flex-col pl-1 w-full': !props.fullMode,

4
packages/nc-gui/components/cell/Text.vue

@ -33,9 +33,7 @@ const focus: VNodeRef = (el) => !isExpandedFormOpen.value && !isEditColumn.value
:ref="focus" :ref="focus"
v-model="vModel" v-model="vModel"
class="h-full w-full outline-none py-1 bg-transparent" class="h-full w-full outline-none py-1 bg-transparent"
:class="{ :class="isExpandedFormOpen ? 'px-2' : 'px-0'"
'px-2': isExpandedFormOpen,
}"
:placeholder="isEditColumn ? $t('labels.optional') : ''" :placeholder="isEditColumn ? $t('labels.optional') : ''"
@blur="editEnabled = false" @blur="editEnabled = false"
@keydown.down.stop @keydown.down.stop

6
packages/nc-gui/components/cell/Url.vue

@ -92,10 +92,8 @@ watch(
:ref="focus" :ref="focus"
v-model="vModel" v-model="vModel"
:placeholder="isEditColumn ? $t('labels.enterDefaultUrlOptional') : ''" :placeholder="isEditColumn ? $t('labels.enterDefaultUrlOptional') : ''"
class="outline-none text-sm w-full px-0 py-1 bg-transparent h-full" class="outline-none text-sm w-full py-1 bg-transparent h-full"
:class="{ :class="isExpandedFormOpen ? 'px-2' : 'px-0'"
'!px-2': isExpandedFormOpen,
}"
@blur="editEnabled = false" @blur="editEnabled = false"
@keydown.down.stop @keydown.down.stop
@keydown.left.stop @keydown.left.stop

Loading…
Cancel
Save