fix(grid): expand auto-fit column width
This commit is contained in:
1 parent
2d2284a0ef
commit
ca30e8ff2d
3 files changed
+46
-6
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { ref, computed, watch, type ComputedRef, type Ref } from "vue";
|
||||
import { useElementSize } from "@vueuse/core";
|
||||
import { calculateDataGridColumnWidth, DATA_GRID_COL_MIN_WIDTH, DATA_GRID_SAMPLE_ROWS } from "@/lib/dataGridColumnWidth";
|
||||
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/dataGridColumnWidth";
|
||||
|
||||
type CellValue = string | number | boolean | null;
|
||||
|
||||
@@ -78,6 +78,8 @@ export function useDataGridColumnResize(options: UseDataGridColumnResizeOptions)
|
||||
columnWidths.value[colIdx] = calculateDataGridColumnWidth({
|
||||
columnName: colName,
|
||||
sampleValues: sampleColumnValues(colIdx),
|
||||
maxWidth: DATA_GRID_COL_AUTO_FIT_MAX_WIDTH,
|
||||
valueTextLimit: DATA_GRID_AUTO_FIT_VALUE_TEXT_LIMIT,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user