fix(data-grid): show first nonblank cell preview line

Closes #5977
This commit is contained in:
t8y2 committed 2026-08-12 14:53:39 +00:00
1 parent 5bda37b05d
commit baec487a21
3 files changed
+52 -2

No files matched your search

+19
View File
@@ -53,6 +53,25 @@ test("buildDataGridCellDetail preserves full value metadata", () => {
});
});
test("buildDataGridCellDetail preserves a leading newline in the full value", () => {
const status = "\n=====================================\nINNODB MONITOR OUTPUT\nbody";
const detail = buildDataGridCellDetail({
rowIndex: 0,
rowId: 1,
row: [status],
columns: ["Status"],
columnIndex: 0,
displayValue: (value) => String(value),
isEditable: false,
});
assert.equal(detail?.value, status);
assert.equal(detail?.rawValue, status);
assert.equal(detail?.rawValuePreview, status);
assert.equal(detail?.displayValue, status);
assert.equal(detail?.displayValuePreview, status);
});
test("buildDataGridCellDetail reports image preview URLs", () => {
const detail = buildDataGridCellDetail({
rowIndex: 0,