pref(grid): improve paging row numbers and cell ellipsis symbols

* pref(grid): improve paging row numbers and cell ellipsis symbols

* fix(grid): paging row numbers is not processed when infiniteScroll enabled
This commit is contained in:
ptma authored and GitHub committed 2026-06-23 15:49:20 +08:00
1 parent f21a4b5ac1
commit 8ae9863c51
2 files changed
+21 -6

No files matched your search

@@ -4379,6 +4379,9 @@ function drawCanvasGrid() {
rowCellsUseSelectionVisual,
cellIsSelected,
cellCanHover: canEditCellItem,
infiniteScrollEnabled: infiniteScrollEnabled.value,
pageSize: pageSize.value,
currentPage: currentPage.value,
});
}
@@ -7432,13 +7435,13 @@ const gridContextMenuItems = computed<ContextMenuItem[]>(() => {
@dblclick.stop="toggleTranspose(item.displayIndex)"
@contextmenu="onRowContext(item.id, item.displayIndex)"
>
{{ item.displayIndex + 1 }}
{{ infiniteScrollEnabled ? item.displayIndex + 1 : item.displayIndex + 1 + (currentPage - 1) * pageSize }}
</div>
<div class="shrink-0" :style="{ width: `${horizontalColumnWindow.beforeWidth}px` }" />
<div
v-for="col in renderedGridColumns"
:key="col.actualColIdx"
class="group/cell shrink-0 px-3 py-1 border-r border-border whitespace-nowrap overflow-hidden text-ellipsis relative select-none flex items-center tabular-nums text-[13px]"
class="group/cell shrink-0 px-3 py-1 border-r border-border whitespace-nowrap overflow-hidden text-ellipsis relative select-none inline-block items-center tabular-nums text-[13px]"
:style="renderedColumnStyle(col.visibleColIdx)"
:class="{
'text-muted-foreground italic': isNull(item.data[col.actualColIdx]),