Browse Source

refactor(gui-v2): form view scrollbar

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3025/head
Pranav C 2 years ago
parent
commit
0ea5f3683e
  1. 11
      packages/nc-gui-v2/components/smartsheet/expanded-form/index.vue
  2. 1
      packages/nc-gui-v2/components/virtual-cell/HasMany.vue
  3. 1
      packages/nc-gui-v2/components/virtual-cell/components/ListChildItems.vue
  4. 2
      packages/nc-gui-v2/components/virtual-cell/components/ListItems.vue

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

@ -80,9 +80,9 @@ const isExpanded = useVModel(props, 'modelValue', emits)
<a-modal v-model:visible="isExpanded" :footer="null" width="min(90vw,1000px)" :body-style="{ padding: 0 }" :closable="false">
<Header @cancel="isExpanded = false" />
<a-card class="!bg-gray-100">
<div class="flex">
<div class="flex-grow">
<div class="h-550px overflow-auto w-[500px] mx-auto">
<div class="flex h-full nc-form-wrapper">
<div class="flex-grow f-full overflow-auto">
<div class="w-[500px] mx-auto">
<div v-for="col in fields" :key="col.title" class="mt-2">
<SmartsheetHeaderVirtualCell v-if="isVirtualCol(col)" :column="col" />
<SmartsheetHeaderCell v-else :column="col" />
@ -131,4 +131,9 @@ const isExpanded = useVModel(props, 'modelValue', emits)
@apply w-[250px] border-left-1;
}
}
.nc-form-wrapper {
max-height: max(calc(90vh - 100px), 600px);
height: max-content !important;
}
</style>

1
packages/nc-gui-v2/components/virtual-cell/HasMany.vue

@ -68,7 +68,6 @@ const unlinkRef = async (rec: Record<string, any>) => {
<template>
<div class="flex align-center items-center gap-1 w-full chips-wrapper">
{{isNew}}
<template v-if="!isForm">
<div class="chips flex align-center img-container flex-grow hm-items flex-nowrap min-w-0 overflow-hidden">
<template v-if="cells">

1
packages/nc-gui-v2/components/virtual-cell/components/ListChildItems.vue

@ -31,7 +31,6 @@ const { isNew, state, removeLTARRef } = useSmartsheetRowStoreOrThrow()
watch([vModel, isForm], (nextVal) => {
if (nextVal[0] || nextVal[1]) {
debugger
loadChildrenList()
}
})

2
packages/nc-gui-v2/components/virtual-cell/components/ListItems.vue

@ -124,7 +124,7 @@ const newRowState = computed(() => {
v-if="expandedFormDlg"
v-model="expandedFormDlg"
:meta="relatedTableMeta"
:row="{ row: {}, oldRow: {}, rowMeta: {new:true} }"
:row="{ row: {}, oldRow: {}, rowMeta: { new: true } }"
:state="newRowState"
load-row
use-meta-fields

Loading…
Cancel
Save