henningn commented on code in PR #6035:
URL: https://github.com/apache/myfaces-tobago/pull/6035#discussion_r1958039488


##########
tobago-theme/tobago-theme-standard/src/main/ts/tobago-sheet.ts:
##########
@@ -598,17 +600,21 @@ Type: ${data.type}`);
       }
     } else {
       const rowIndexes: number[] = [];
-      this.rowElements.forEach((rowElement) => {
+      const tableRows = this.rowElements;
+      tableRows.forEach((rowElement) => {
         if (rowElement.hasAttribute("row-index")) {
-          rowIndexes.push(Number(rowElement.getAttribute("row-index")));
+          if(!this.columnSelector.rowElement(rowElement).disabled) {
+            rowIndexes.push(Number(rowElement.getAttribute("row-index")));
+          }
         }
       });
-
       let everyRowAlreadySelected = true;
       rowIndexes.forEach((rowIndex, index, array) => {
         if (!selected.has(rowIndex)) {
-          everyRowAlreadySelected = false;
-          selected.add(rowIndex);
+          
if(!this.columnSelector.rowElement(tableRows.item(rowIndex-this.first)).disabled)
 {

Review Comment:
   Do not check for disabled column selectors at this line. The column selector 
is already checked in line 606. This "if" must be removed. It make things 
complicated and it causes an issue in the test for: 
content/900-test/3000-sheet/90-sheet-in-sheet/Sheet_in_sheet.xhtml



##########
tobago-theme/tobago-theme-standard/src/main/ts/tobago-sheet.ts:
##########
@@ -652,7 +659,9 @@ Type: ${data.type}`);
         let everyRowSelected = true;
         for (let i = this.first; i < this.first + this.rows; i++) {
           if (!selected.has(i)) {
-            everyRowSelected = false;
+            if (!this.columnSelector.rowElement(tableRows.item(i - 
this.first)).disabled) {

Review Comment:
   Possible NPE. There must be a check if 
this.columnSelector.rowElement(tableRows.item(i - this.first) is null.



##########
tobago-theme/tobago-theme-standard/src/main/ts/tobago-sheet.ts:
##########
@@ -492,6 +492,8 @@ Type: ${data.type}`);
 
     if (this.columnSelector && this.columnSelector.disabled) {
       return;
+    } else if (this.columnSelector && 
this.columnSelector.rowElement(row).disabled) {

Review Comment:
   Possible NPE. There must be a check if this.columnSelector.rowElement(row) 
is null.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to