amaannawab923 opened a new pull request, #41390: URL: https://github.com/apache/superset/pull/41390
### SUMMARY With time-comparison "basic" conditional formatting (green for increase / red for decrease), sorting the interactive table made the colors and arrows land on the wrong rows — they kept reflecting the pre-sort order. The basic color formatters are computed in the original query order, but they were being looked up by the grid's *displayed* row index. Once you sort, displayed row N no longer points at the same underlying record, so the formatter for one row ended up painted on another. The fix attaches each row's formatter to its own row-data object (non-enumerable, so it never leaks into CSV exports, cross-filters or object spreads) and resolves it from the node's data instead of the display index — so it travels with the row through sorting. There's still a positional fallback for safety. Both the cell background (`getCellStyle`) and the arrow indicator (`NumericCellRenderer`) now go through the same helper. ### TESTING INSTRUCTIONS 1. Create an interactive table with a dimension and a metric, apply a time-shift comparison. 2. Enable **Basic conditional formatting → Green for increase, red for decrease**. 3. Sort the dimension column ascending/descending. 4. The increase/decrease colors and arrows should stay attached to the correct rows after sorting. Unit tests added for the row-formatter resolver (uses the attached formatter over the display index, falls back positionally, and confirms the attached property is non-enumerable). ### ADDITIONAL INFORMATION - [x] Changes UI -- 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]
