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. 17
      packages/nc-gui/composables/useGalleryViewData.ts

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

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

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

@ -21,8 +21,19 @@ export function useGalleryViewData(
const viewData = ref<GalleryType | undefined>() const viewData = ref<GalleryType | undefined>()
const { cachedRows, syncCount, clearCache, deleteRow, loadData, navigateToSiblingRow, totalRows, fetchChunk, chunkStates } = const {
useInfiniteData({ cachedRows,
syncCount,
clearCache,
deleteRow,
loadData,
navigateToSiblingRow,
totalRows,
fetchChunk,
chunkStates,
isFirstRow,
isLastRow,
} = useInfiniteData({
meta, meta,
viewMeta, viewMeta,
callbacks: {}, callbacks: {},
@ -46,5 +57,7 @@ export function useGalleryViewData(
chunkStates, chunkStates,
syncCount, syncCount,
fetchChunk, fetchChunk,
isFirstRow,
isLastRow,
} }
} }

Loading…
Cancel
Save