@@ -1036,7 +1036,7 @@ class IrisGridTableModelTemplate<
10361036 */
10371037 pendingRow ( y : ModelIndex ) : ModelIndex | null {
10381038 const pendingRow = y - this . floatingTopRowCount - this . table . size ;
1039- if ( pendingRow >= 0 && pendingRow < this . pendingNewRowCount ) {
1039+ if ( pendingRow >= 0 ) {
10401040 return pendingRow ;
10411041 }
10421042
@@ -1633,7 +1633,11 @@ class IrisGridTableModelTemplate<
16331633
16341634 isEditableRange ( range : GridRange ) : boolean {
16351635 // Make sure we have an input table and a valid range
1636- if ( this . inputTable == null || ! GridRange . isBounded ( range ) ) {
1636+ if (
1637+ this . inputTable == null ||
1638+ range . startRow == null ||
1639+ range . endRow == null
1640+ ) {
16371641 return false ;
16381642 }
16391643
@@ -1645,12 +1649,10 @@ class IrisGridTableModelTemplate<
16451649 this . isPendingRow ( range . startRow ) && this . isPendingRow ( range . endRow ) ;
16461650
16471651 let isKeyColumnInRange = false ;
1652+ assertNotNull ( range . startColumn ) ;
16481653 // Check if any of the columns in grid range are key columns
1649- for (
1650- let column = range . startColumn ;
1651- column <= range . endColumn ;
1652- column += 1
1653- ) {
1654+ const bound = range . endColumn ?? this . table . size ;
1655+ for ( let column = range . startColumn ; column <= bound ; column += 1 ) {
16541656 if ( this . isKeyColumn ( column ) ) {
16551657 isKeyColumnInRange = true ;
16561658 break ;
@@ -1663,17 +1665,6 @@ class IrisGridTableModelTemplate<
16631665 return false ;
16641666 }
16651667
1666- // Editing the aggregations/totals which are floating above/below is not allowed
1667- if (
1668- range . startRow < this . floatingTopRowCount ||
1669- range . startRow >=
1670- this . floatingTopRowCount + this . table . size + this . pendingRowCount ||
1671- range . endRow >=
1672- this . floatingTopRowCount + this . table . size + this . pendingRowCount
1673- ) {
1674- return false ;
1675- }
1676-
16771668 return true ;
16781669 }
16791670
0 commit comments