fix(grid): toggle context transpose view
This commit is contained in:
1 parent
1d57bc575f
commit
efdf843d2f
3 files changed
+44
-9
No files matched your search
@@ -2,6 +2,7 @@ import { strict as assert } from "node:assert";
|
||||
import test from "node:test";
|
||||
import {
|
||||
buildTransposeRows,
|
||||
nextContextTransposeState,
|
||||
nextTransposeState,
|
||||
transposeAnchorRowIndex,
|
||||
transposeFieldWidth,
|
||||
@@ -30,6 +31,23 @@ test("row number double click closes transpose for the same row", () => {
|
||||
});
|
||||
});
|
||||
|
||||
test("context menu transpose closes when invoked for the current anchor row", () => {
|
||||
assert.deepEqual(
|
||||
nextContextTransposeState({
|
||||
showTranspose: true,
|
||||
transposeRowIndex: 2,
|
||||
requestedRowIndex: 3,
|
||||
rowIds: [10, 11, 12, 13, 14],
|
||||
selectedRowIds: new Set([12, 13]),
|
||||
selectedRange: null,
|
||||
}),
|
||||
{
|
||||
showTranspose: false,
|
||||
transposeRowIndex: null,
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
test("builds one virtualizable transpose row per field with all record values", () => {
|
||||
const rows = buildTransposeRows({
|
||||
columns: ["id", "name", "notes"],
|
||||
|
||||
Reference in new issue
Block a user