Browse Source

Placeholder coding attempt

pull/5531/head
nith2001 2 years ago
parent
commit
db733f3a48
  1. 18
      packages/nc-gui/components/smartsheet/Form.vue

18
packages/nc-gui/components/smartsheet/Form.vue

@ -100,6 +100,8 @@ const activeRow = ref('')
const editEnabled = ref<boolean[]>([]) const editEnabled = ref<boolean[]>([])
const isHeaderContentSet = ref(false);
const { t } = useI18n() const { t } = useI18n()
const { betaFeatureToggleState } = useBetaFeatureToggle() const { betaFeatureToggleState } = useBetaFeatureToggle()
@ -549,17 +551,25 @@ function selectAll(event: KeyboardEvent) {
<div v-if="isEditable" class="px-4 lg:px-12"> <div v-if="isEditable" class="px-4 lg:px-12">
<a-form-item v-if="isEditable"> <a-form-item v-if="isEditable">
<div <div
class="input w-full !font-bold !text-4xl !border-0 !border-b-1 !border-dashed !rounded-none !border-gray-400" class="nc-form-heading input w-full !font-bold !text-4xl !border-0 !border-b-1 !border-dashed !rounded-none !border-gray-400"
role="textbox" role="textbox"
contenteditable="true" contenteditable="true"
:style="{ borderRightWidth: '0px !important' }" :style="{ borderRightWidth: '0px !important' }"
hide-details
:bordered="false"
data-testid="nc-form-heading" data-testid="nc-form-heading"
@keydown="selectAll" @keydown="selectAll"
@focus="isHeaderContentSet = false"
@blur="updateView" @blur="updateView"
@keydown.enter.prevent="updateView" @keydown.enter.prevent="updateView"
>Form Title</div> >
<span
v-if="!isHeaderContentSet"
class="placeholder"
:style="{ color: '#A9A9A9' }"
>
Form Title
</span>
<span v-else>{{ formViewData.heading }}</span>
</div>
</a-form-item> </a-form-item>
</div> </div>
<div v-else class="px-4 ml-3 w-full text-bold text-4xl">{{ formViewData.heading }}</div> <div v-else class="px-4 ml-3 w-full text-bold text-4xl">{{ formViewData.heading }}</div>

Loading…
Cancel
Save