rusackas commented on code in PR #37625:
URL: https://github.com/apache/superset/pull/37625#discussion_r2770065513


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.tsx:
##########
@@ -599,17 +719,17 @@ export class TableRenderer extends Component {
     const rowIncrSpan = rowAttrs.length !== 0 ? 1 : 0;
     // Iterate through columns. Jump over duplicate values.
     let i = 0;
-    while (i < visibleColKeys.length) {
-      let handleContextMenu;
-      const colKey = visibleColKeys[i];
-      const colSpan = attrIdx < colKey.length ? colAttrSpans[i][attrIdx] : 1;
+    while (i < visibleColKeys!.length) {

Review Comment:
   Good suggestion — will add a single null guard at the top of the method 
instead of repeating the non-null assertion.



##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.tsx:
##########
@@ -936,13 +1085,13 @@ export class TableRenderer extends Component {
       ) : null;
 
     const rowClickHandlers = cellCallbacks[flatRowKey] || {};
-    const valueCells = visibleColKeys.map(colKey => {
+    const valueCells = visibleColKeys!.map((colKey: string[]) => {

Review Comment:
   Good suggestion — will add a single null guard at the top of the method 
instead of repeating the non-null assertion.



##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.tsx:
##########
@@ -1043,7 +1195,7 @@ export class TableRenderer extends Component {
       </th>
     );
 
-    const totalValueCells = visibleColKeys.map(colKey => {
+    const totalValueCells = visibleColKeys!.map((colKey: string[]) => {

Review Comment:
   Good suggestion — will add a single null guard at the top of the method 
instead of repeating the non-null assertion.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to