feat(data-grid): make the row number column show original row numbers

This commit is contained in:
xianghu908 authored and GitHub committed 2026-09-24 12:11:58 +08:00
1 parent 9ab1462ca8
commit 6517284d95
17 files changed
+196 -10

No files matched your search

@@ -371,6 +371,12 @@ describe("normalizeEditorSettings", () => {
expect(normalizeEditorSettings({ dataGridSearchMode: "invalid" as any }).dataGridSearchMode).toBe("filter");
});
it("defaults the data grid row number column to the view position and preserves original row numbers", () => {
expect(normalizeEditorSettings({}).dataGridRowNumberMode).toBe("view");
expect(normalizeEditorSettings({ dataGridRowNumberMode: "source" }).dataGridRowNumberMode).toBe("source");
expect(normalizeEditorSettings({ dataGridRowNumberMode: "invalid" as any }).dataGridRowNumberMode).toBe("view");
});
it("defaults the global data grid copy preference and preserves valid choices", () => {
expect(normalizeEditorSettings({}).dataGridCopyExtractor).toBe("smart");
expect(normalizeEditorSettings({ dataGridCopyExtractor: "smart" }).dataGridCopyExtractor).toBe("smart");