diff --git a/packages/nc-gui/components/smartsheet/Gallery.vue b/packages/nc-gui/components/smartsheet/Gallery.vue index a4e1786a1c..5ef45bc76b 100644 --- a/packages/nc-gui/components/smartsheet/Gallery.vue +++ b/packages/nc-gui/components/smartsheet/Gallery.vue @@ -102,7 +102,6 @@ const attachments = (record: any): Attachment[] => { const expandForm = (row: RowType, state?: Record) => { const rowId = extractPkFromRow(row.row, meta.value!.columns!) - expandedFormRow.value = row expandedFormRowState.value = state if (rowId && !isPublic.value) { @@ -113,6 +112,7 @@ const expandForm = (row: RowType, state?: Record) => { }, }) } else { + expandedFormRow.value = row expandedFormDlg.value = true } } diff --git a/packages/nc-gui/components/smartsheet/Kanban.vue b/packages/nc-gui/components/smartsheet/Kanban.vue index d8b5f982d6..6237969675 100644 --- a/packages/nc-gui/components/smartsheet/Kanban.vue +++ b/packages/nc-gui/components/smartsheet/Kanban.vue @@ -139,7 +139,6 @@ reloadViewMetaHook?.on(async () => { const expandForm = (row: RowType, state?: Record) => { const rowId = extractPkFromRow(row.row, meta.value!.columns!) - expandedFormRow.value = row expandedFormRowState.value = state if (rowId && !isPublic.value) { router.push({ @@ -149,6 +148,7 @@ const expandForm = (row: RowType, state?: Record) => { }, }) } else { + expandedFormRow.value = row expandedFormDlg.value = true } } diff --git a/packages/nc-gui/components/smartsheet/Map.vue b/packages/nc-gui/components/smartsheet/Map.vue index 409f2cc264..b4479dca6f 100644 --- a/packages/nc-gui/components/smartsheet/Map.vue +++ b/packages/nc-gui/components/smartsheet/Map.vue @@ -51,9 +51,8 @@ const getMapCenterLocalStorageKey = (viewId: string) => `mapView.${viewId}.cente const expandForm = (row: Row, state?: Record) => { const rowId = extractPkFromRow(row.row, meta.value!.columns!) - expandedFormRow.value = row - if (rowId) { + if (rowId && !isPublic.value) { router.push({ query: { ...route.query, @@ -61,6 +60,7 @@ const expandForm = (row: Row, state?: Record) => { }, }) } else { + expandedFormRow.value = row expandedFormRowState.value = state expandedFormDlg.value = true } diff --git a/packages/nc-gui/components/smartsheet/Toolbar.vue b/packages/nc-gui/components/smartsheet/Toolbar.vue index 8b8f30b7b2..fbbef4e261 100644 --- a/packages/nc-gui/components/smartsheet/Toolbar.vue +++ b/packages/nc-gui/components/smartsheet/Toolbar.vue @@ -18,7 +18,7 @@ const isTab = computed(() => { diff --git a/packages/nc-gui/components/smartsheet/grid/index.vue b/packages/nc-gui/components/smartsheet/grid/index.vue index c7118a2f75..288fef994c 100644 --- a/packages/nc-gui/components/smartsheet/grid/index.vue +++ b/packages/nc-gui/components/smartsheet/grid/index.vue @@ -88,7 +88,6 @@ const skipRowRemovalOnCancel = ref(false) function expandForm(row: Row, state?: Record, fromToolbar = false) { const rowId = extractPkFromRow(row.row, meta.value?.columns as ColumnType[]) - expandedFormRow.value = row expandedFormRowState.value = state if (rowId && !isPublic.value) { router.push({ @@ -98,6 +97,7 @@ function expandForm(row: Row, state?: Record, fromToolbar = false) }, }) } else { + expandedFormRow.value = row expandedFormDlg.value = true skipRowRemovalOnCancel.value = !fromToolbar } diff --git a/packages/nc-gui/composables/useApi/index.ts b/packages/nc-gui/composables/useApi/index.ts index 596ce67b63..03eef3b2c6 100644 --- a/packages/nc-gui/composables/useApi/index.ts +++ b/packages/nc-gui/composables/useApi/index.ts @@ -61,14 +61,18 @@ export function useApi({ const api = useGlobalInstance && !!nuxtApp.$api ? nuxtApp.$api : createApiInstance(apiOptions) /** set loading to true and increment local and global request counter */ - function onRequestStart() { - isLoading.value = true + // Long Polling causes the loading spinner to never stop + // hence we are excluding the polling request from the loading spinner + function onRequestStart(config) { + if (config.url !== '/api/v1/notifications/poll') { + isLoading.value = true - /** local count */ - inc() + /** local count */ + inc() - /** global count */ - nuxtApp.$state.runningRequests.inc() + /** global count */ + nuxtApp.$state.runningRequests.inc() + } } /** decrement local and global request counter and check if we can stop loading */ @@ -99,7 +103,7 @@ export function useApi({ (config) => { reset() - onRequestStart() + onRequestStart(config) return { ...config, diff --git a/packages/nc-gui/composables/useViewData.ts b/packages/nc-gui/composables/useViewData.ts index 11f94687bc..be5c5a8c0b 100644 --- a/packages/nc-gui/composables/useViewData.ts +++ b/packages/nc-gui/composables/useViewData.ts @@ -347,9 +347,8 @@ export function useViewData( // extract the row id of the sibling row const rowId = extractPkFromRow(formattedData.value[siblingRowIndex].row, meta.value?.columns as ColumnType[]) - if (rowId) { - router.push({ + await router.push({ query: { ...routeQuery.value, rowId, diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json index 2e8d311acf..a44e74ad61 100644 --- a/packages/nc-gui/lang/en.json +++ b/packages/nc-gui/lang/en.json @@ -1133,6 +1133,7 @@ "thisSharedViewIsProtected": "This shared view is protected", "successfullySubmittedFormData": "Successfully submitted form data", "formViewNotSupportedOnMobile": "Form view is not supported on mobile", + "calendarViewNotSupportedOnMobile": "Calendar view is not supported on mobile", "newFormWillBeLoaded": "New form will be loaded after {seconds} seconds", "optimizedQueryDisabled": "Optimized query is disabled", "optimizedQueryEnabled": "Optimized query is enabled",