Browse Source

fix: preloader fix in link modal

pull/6486/head
sreehari jayaraj 12 months ago
parent
commit
250476cbc4
  1. 27
      packages/nc-gui/components/smartsheet/expanded-form/index.vue
  2. 15
      packages/nc-gui/components/virtual-cell/components/ListChildItems.vue

27
packages/nc-gui/components/smartsheet/expanded-form/index.vue

@ -642,18 +642,21 @@ export default {
</div>
</NcModal>
<NcModal v-model:visible="showDeleteRowModal" class="!w-[25rem] !xs-">
<div class="">
<div class="prose-xl font-bold self-center">Delete row ?</div>
<div class="mt-4">Are you sure you want to delete this row?</div>
</div>
<div class="flex flex-row gap-x-2 mt-4 pt-1.5 justify-end pt-4 gap-x-3">
<NcButton v-if="isMobileMode" type="secondary" @click="showDeleteRowModal = false">{{ $t('general.cancel') }} </NcButton>
<NcButton v-e="['a:row-expand:delete']" @click="onConfirmDeleteRowClick">{{ $t('general.confirm') }} </NcButton>
</div>
</NcModal>
<GeneralDeleteModal v-model:visible="showDeleteRowModal" entity-name="Record" :on-delete="() => onConfirmDeleteRowClick()">
<template #entity-preview>
<span>
<div class="flex flex-row items-center py-2.25 px-2.5 bg-gray-50 rounded-lg text-gray-700 mb-4">
<component :is="iconMap.table" class="nc-view-icon" />
<div
class="capitalize text-ellipsis overflow-hidden select-none w-full pl-1.75"
:style="{ wordBreak: 'keep-all', whiteSpace: 'nowrap', display: 'inline' }"
>
{{ displayValue }}
</div>
</div>
</span>
</template>
</GeneralDeleteModal>
</template>
<style lang="scss">

15
packages/nc-gui/components/virtual-cell/components/ListChildItems.vue

@ -49,6 +49,8 @@ const {
displayValueProp,
} = useLTARStoreOrThrow()
isChildrenLoading.value = true
const { isNew, state, removeLTARRef, addLTARRef } = useSmartsheetRowStoreOrThrow()
watch(
@ -121,6 +123,13 @@ watch(expandedFormDlg, () => {
onKeyStroke('Escape', () => {
vModel.value = false
})
const isDataExist = computed(() => {
if (childrenList.value?.pageInfo?.totalRows || (isNew.value && state.value?.[colTitle.value]?.length)) {
return true
}
return false
})
</script>
<template>
@ -142,7 +151,7 @@ onKeyStroke('Escape', () => {
:related-table-title="relatedTableMeta?.title"
:display-value="row.row[displayValueProp]"
/>
<div v-if="!isForm" class="m-4 bg-gray-50 border-gray-50 border-b-2"></div>
<div v-if="!isForm" class="m-4 bg-gray-50 border-gray-50 border-b-2">></div>
<div v-if="!isForm" class="flex mt-2 mb-2 items-center gap-2">
<div
@ -166,7 +175,7 @@ onKeyStroke('Escape', () => {
</div>
</div>
<template v-if="(isNew && state?.[colTitle]?.length) || childrenList?.pageInfo?.totalRows">
<template v-if="isDataExist">
<div class="mt-2 mb-2">
<div
:class="{
@ -233,7 +242,7 @@ onKeyStroke('Escape', () => {
</div>
</template>
<div
v-else
v-if="!isDataExist && !isChildrenLoading"
:class="{
'h-[420px]': !isForm,
'h-[250px]': isForm,

Loading…
Cancel
Save