Browse Source

fix: expanded-row fixes

pull/9799/head
DarkPhoenix2704 2 weeks ago
parent
commit
9ad9367411
  1. 6
      packages/nc-gui/components/smartsheet/Gallery.vue
  2. 27
      packages/nc-gui/composables/useGalleryViewData.ts

6
packages/nc-gui/components/smartsheet/Gallery.vue

@ -38,6 +38,8 @@ const {
chunkStates,
cachedRows,
totalRows,
isFirstRow,
isLastRow,
clearCache,
viewData: galleryData,
} = useGalleryViewData(meta, view, xWhere)
@ -541,6 +543,8 @@ reloadViewDataHook?.on(async () => {
v-model="expandedFormDlg"
:row="expandedFormRow"
:load-row="!isPublic"
:first-row="isFirstRow"
:last-row="isLastRow"
:state="expandedFormRowState"
:meta="meta"
:view="view"
@ -554,6 +558,8 @@ reloadViewDataHook?.on(async () => {
:meta="meta"
:load-row="!isPublic"
:row-id="route.query.rowId"
:first-row="isFirstRow"
:last-row="isLastRow"
:view="view"
show-next-prev-icons
:expand-form="expandForm"

27
packages/nc-gui/composables/useGalleryViewData.ts

@ -21,13 +21,24 @@ export function useGalleryViewData(
const viewData = ref<GalleryType | undefined>()
const { cachedRows, syncCount, clearCache, deleteRow, loadData, navigateToSiblingRow, totalRows, fetchChunk, chunkStates } =
useInfiniteData({
meta,
viewMeta,
callbacks: {},
where,
})
const {
cachedRows,
syncCount,
clearCache,
deleteRow,
loadData,
navigateToSiblingRow,
totalRows,
fetchChunk,
chunkStates,
isFirstRow,
isLastRow,
} = useInfiniteData({
meta,
viewMeta,
callbacks: {},
where,
})
async function loadGalleryData() {
if (!viewMeta?.value?.id) return
@ -46,5 +57,7 @@ export function useGalleryViewData(
chunkStates,
syncCount,
fetchChunk,
isFirstRow,
isLastRow,
}
}

Loading…
Cancel
Save