refactor(data-grid): drop unused gridRef/scrollbarGutter options from useDataGridColumnResize

This commit is contained in:
t8y2 committed 2026-07-07 13:24:05 +08:00
1 parent 6e7f0578b6
commit e67e7730d1
3 files changed
+2 -8

No files matched your search

@@ -1,4 +1,4 @@
import { computed, ref } from "vue";
import { computed } from "vue";
import { describe, expect, it } from "vitest";
import { DATA_GRID_COL_AUTO_FIT_MAX_WIDTH, DATA_GRID_COL_MAX_WIDTH, DATA_GRID_COL_MIN_WIDTH } from "@/lib/dataGrid/dataGridColumnWidth";
import { DATA_GRID_ROW_NUM_WIDTH, resizeDataGridColumnWidth, useDataGridColumnResize } from "@/composables/useDataGridColumnResize";
@@ -8,8 +8,6 @@ function createResizeState(options: { columns: string[]; rows: Array<Array<strin
columns: computed(() => options.columns),
sourceRows: computed(() => options.rows),
columnIndexes: computed(() => options.columnIndexes ?? options.columns.map((_, index) => index)),
gridRef: ref<HTMLDivElement>(),
scrollbarGutter: ref(0),
});
}
@@ -1,4 +1,4 @@
import { ref, computed, watch, type ComputedRef, type Ref } from "vue";
import { ref, computed, watch, type ComputedRef } from "vue";
import { calculateDataGridColumnWidth, DATA_GRID_AUTO_FIT_VALUE_TEXT_LIMIT, DATA_GRID_COL_AUTO_FIT_MAX_WIDTH, DATA_GRID_COL_MIN_WIDTH, DATA_GRID_SAMPLE_ROWS } from "@/lib/dataGrid/dataGridColumnWidth";
type CellValue = string | number | boolean | null;
@@ -13,8 +13,6 @@ export interface UseDataGridColumnResizeOptions {
columns: ComputedRef<string[]>;
sourceRows: ComputedRef<CellValue[][]>;
columnIndexes: ComputedRef<number[]>;
gridRef: Ref<HTMLDivElement | undefined>;
scrollbarGutter?: Ref<number>;
}
export function useDataGridColumnResize(options: UseDataGridColumnResizeOptions) {