Skip to content

Commit 5d15019

Browse files
authored
fix: DH-18976: Add proper bounds to pendingRow logic (#2457)
Part of DH-18976. Fixes an issue where the pendingRow check didn't account for totals rows, causing aggregations to be incorrectly flagged as pending in the color logic.
1 parent bec0256 commit 5d15019

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/iris-grid/src/IrisGridTableModelTemplate.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,12 @@ class IrisGridTableModelTemplate<
10341034
* @returns The row within the pending input rows if it's a pending row, null otherwise
10351035
*/
10361036
pendingRow(y: ModelIndex): ModelIndex | null {
1037+
if (!this.isEditable) {
1038+
return null;
1039+
}
1040+
10371041
const pendingRow = y - this.floatingTopRowCount - this.table.size;
1042+
10381043
if (pendingRow >= 0) {
10391044
return pendingRow;
10401045
}

0 commit comments

Comments
 (0)