bito-code-review[bot] commented on PR #43917:
URL: https://github.com/apache/superset/pull/43917#issuecomment-5548656914

   <!-- Bito Reply -->
   The issue is correct. When multiple row attributes are present, each 
`th.pvtRowLabel` cell needs a unique `left` offset corresponding to its column 
index to prevent them from overlapping at `left: 0`.
   
   To resolve this, you can dynamically set the `left` property based on the 
column index. Since `react-pivottable` renders these labels in a table 
structure, you can use the `nth-child` selector or a data attribute if 
available. Given the current implementation, a CSS-only approach using 
`nth-child` is the most concise fix:
   
   ```typescript
   // In Styles.ts, update the pvtRowLabel selector:
   table.pvtTable tbody tr th.pvtRowLabel {
     vertical-align: baseline;
     position: ${isDashboardEditMode ? 'inherit' : 'sticky'};
     z-index: 1;
     background-color: ${theme.colorBgBase};
   }
   
   /* Add specific offsets for nested row labels */
   table.pvtTable tbody tr th.pvtRowLabel:nth-child(1) { left: 0; }
   table.pvtTable tbody tr th.pvtRowLabel:nth-child(2) { left: 100px; } /* 
Adjust width as needed */
   ```
   
   Would you like me to check the rest of the comments on this PR to see if 
there are other issues to address?
   
   
**superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/Styles.ts**
   ```
   table.pvtTable tbody tr th.pvtRowLabel:nth-child(1) { left: 0; }
   table.pvtTable tbody tr th.pvtRowLabel:nth-child(2) { left: 100px; }
   ```


-- 
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