fix(grid): restore column jump in transposed table view
This commit is contained in:
2 files changed
+32
-17
No files matched your search
@@ -164,3 +164,15 @@ test("error result recovery participates in canvas observer remounts", () => {
|
||||
const source = readFileSync("apps/desktop/src/components/grid/DataGrid.vue", "utf8");
|
||||
assert.match(source, /watch\(\s*\[useCanvasGridRows, hasVisibleRows, isErrorResult\]/);
|
||||
});
|
||||
|
||||
test("column navigation scrolls visible transpose fields before looking for the normal grid", () => {
|
||||
const source = readFileSync("apps/desktop/src/components/grid/DataGrid.vue", "utf8");
|
||||
const navigation = source.slice(source.indexOf("function scrollToColumnIndex("), source.indexOf("// --- Column resize composable ---"));
|
||||
assert.match(navigation, /showColumn\(columnIndex\)/);
|
||||
assert.match(navigation, /visibleColumnIndexes\.value\.indexOf\(columnIndex\)/);
|
||||
assert.match(navigation, /if \(isTransposeMode\.value\) \{\s*scrollTransposeFieldIntoView\(visibleColIdx\);\s*return;/);
|
||||
assert.ok(navigation.indexOf("scrollTransposeFieldIntoView") < navigation.indexOf('".data-grid-scroller"'));
|
||||
assert.match(source, /scrollToItem\?\.\(visibleFieldIndex\)/);
|
||||
assert.match(source, /scroller\.scrollTop = visibleFieldIndex \* transposeRowHeight\.value/);
|
||||
assert.match(source, /'ring-2 ring-inset ring-primary': highlightedColumnIndex === visibleColumnIndexes\[index\]/);
|
||||
});
|
||||
Reference in new issue
Block a user