Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Console error when opening context menu on tree table #2047

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions packages/iris-grid/src/IrisGridTreeTableModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,16 @@ class IrisGridTreeTableModel extends IrisGridTableModelTemplate<
this.viewportData.rows[r - this.viewportData.offset];
assertNotNull(intersection.startColumn);
assertNotNull(intersection.endColumn);
for (
let c = intersection.startColumn;
c <= intersection.endColumn;
c += 1
) {
assertNotNull(formatValue);
resultRow.push(
formatValue(viewportRow.data.get(c)?.value, this.columns[c])
);
if (formatValue != null) {
for (
let c = intersection.startColumn;
c <= intersection.endColumn;
c += 1
) {
resultRow.push(
formatValue(viewportRow.data.get(c)?.value, this.columns[c])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still want to populate the resultRow array with unformatted values if formatValue is not defined.
With this change, the resultRow ends up empty.

);
}
}
result.push(resultRow);
}
Expand Down
Loading