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

   <!-- Bito Reply -->
   The flagged issue is correct. The current test mounts `DataTable` with plain 
`<td>` elements that lack the `onClick` handler responsible for triggering 
cross-filters, meaning the test does not exercise the actual integration path 
that causes the pagination reset bug. To resolve this, you should update the 
`Cell` renderer in the test to include the `onClick` handler that mimics the 
`TableChart` behavior, or mount the `TableChart` component itself to ensure the 
full integration is tested.
   
   Here is a concise way to update the test columns to include a mock click 
handler:
   
   ```tsx
   // Update the Cell renderer in the test columns
   Cell: ({ value }: CellProps<DataRow>) => (
     <td onClick={() => console.log('Filter triggered')}>{value}</td>
   ),
   ```
   
   I have checked the PR comments and there are no other pending review 
comments to address. Would you like me to proceed with any other tasks?
   
   **superset-frontend/plugins/plugin-chart-table/test/TableChart.test.tsx**
   ```
   Cell: ({ value }: CellProps<DataRow>) => (
     <td onClick={() => console.log('Filter triggered')}>{value}</td>
   ),
   ```


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