diff --git a/packages/nc-gui/components/shared-view/Gallery.vue b/packages/nc-gui/components/shared-view/Gallery.vue index 250e07c1c3..6e6d0d7f71 100644 --- a/packages/nc-gui/components/shared-view/Gallery.vue +++ b/packages/nc-gui/components/shared-view/Gallery.vue @@ -1,5 +1,18 @@ diff --git a/packages/nc-gui/components/smartsheet/Kanban.vue b/packages/nc-gui/components/smartsheet/Kanban.vue index 22e02d1e6b..fef118c83b 100644 --- a/packages/nc-gui/components/smartsheet/Kanban.vue +++ b/packages/nc-gui/components/smartsheet/Kanban.vue @@ -291,7 +291,8 @@ const kanbanListScrollHandler = useDebounceFn(async (e: any) => { const stackTitle = e.target.getAttribute('data-stack-title') const pageSize = appInfo.value.defaultLimit || 25 const stack = formattedData.value.get(stackTitle) - if (stack) { + + if (stack && (countByStack.value.get(stackTitle) === undefined || stack.length < countByStack.value.get(stackTitle)!)) { const page = Math.ceil(stack.length / pageSize) await loadMoreKanbanData(stackTitle, { offset: page * pageSize }) } diff --git a/packages/nc-gui/components/smartsheet/expanded-form/index.vue b/packages/nc-gui/components/smartsheet/expanded-form/index.vue index e1dd68a6ce..9edadf1492 100644 --- a/packages/nc-gui/components/smartsheet/expanded-form/index.vue +++ b/packages/nc-gui/components/smartsheet/expanded-form/index.vue @@ -168,7 +168,9 @@ const isExpanded = useVModel(props, 'modelValue', emits, { }) const onClose = () => { - if (changedColumns.value.size > 0) { + if (!isUIAllowed('dataEdit')) { + isExpanded.value = false + } else if (changedColumns.value.size > 0) { isCloseModalOpen.value = true } else { if (_row.value?.rowMeta?.new) emits('cancel') @@ -457,7 +459,7 @@ const onIsExpandedUpdate = (v: boolean) => { if (changedColumns.value.size === 0 && !isUnsavedFormExist.value) { isExpanded.value = v - } else if (!v) { + } else if (!v && isUIAllowed('dataEdit')) { preventModalStatus.value = true } else { isExpanded.value = v @@ -555,10 +557,11 @@ export default { {}" + :disabled="isLoading" + @click="copyRecordUrl()" > @@ -567,28 +570,18 @@ export default { - - + + - + {{ $t('general.reload') }} - {}"> - - - {{ $t('labels.copyRecordURL') }} - - - {}" - > + {}"> - + @@ -808,17 +801,23 @@ export default { class="w-full h-16 border-t-1 border-gray-200 bg-white flex items-center justify-end p-3 xs:(p-0 mt-4 border-t-0 gap-x-4 justify-between)" > - - + + - + {{ $t('general.reload') }} + {}"> + + + {{ $t('labels.copyRecordURL') }} + + ()) const { base } = storeToRefs(useBase()) - const row = ref(_row.value.rowMeta.new ? _row.value : ({ row: {}, oldRow: {}, rowMeta: {} } as Row)) + + const { sharedView } = useSharedView() + + const row = ref( + sharedView.value?.type === ViewTypes.GALLERY || sharedView.value?.type === ViewTypes.KANBAN || _row.value.rowMeta.new + ? _row.value + : ({ row: {}, oldRow: {}, rowMeta: {} } as Row), + ) const rowStore = useProvideSmartsheetRowStore(meta, row) const activeView = inject(ActiveViewInj, ref()) - const { sharedView } = useSharedView() - const { addUndo, clone, defineViewScope } = useUndoRedo() const reloadTrigger = inject(ReloadRowDataHookInj, createEventHook()) diff --git a/tests/playwright/pages/SharedForm/index.ts b/tests/playwright/pages/SharedForm/index.ts index 2f435427e9..a4bfbb3d08 100644 --- a/tests/playwright/pages/SharedForm/index.ts +++ b/tests/playwright/pages/SharedForm/index.ts @@ -20,6 +20,8 @@ export class SharedFormPage extends BasePage { httpMethodsToMatch: ['POST'], requestUrlPathToMatch: '/rows', }); + + await this.rootPage.waitForTimeout(200); } async verifySuccessMessage() {