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

   <!-- Bito Reply -->
   The flagged issue is correct. Because `expandable` is included in `rest` and 
then spread into `<StyledTable {...rest} />`, it overwrites the `sharedProps` 
object that contains the merged `childrenColumnName`. To resolve this, you 
should destructure `expandable` from `props` before creating `rest` and then 
merge it explicitly.
   
   Here is the suggested fix for 
`superset-frontend/packages/superset-ui-core/src/components/Table/index.tsx`:
   
   ```tsx
   const { childrenColumnName, expandable, ...rest } = props;
   const sharedProps = {
     ...rest,
     expandable: {
       childrenColumnName,
       ...expandable,
     },
   };
   return <StyledTable {...sharedProps} />;
   ```
   
   I have checked the available PR comments, and there are no other actionable 
suggestions to address. Would you like me to perform any further analysis?
   
   
**superset-frontend/packages/superset-ui-core/src/components/Table/index.tsx**
   ```
   const { childrenColumnName, expandable, ...rest } = props;
   const sharedProps = {
     ...rest,
     expandable: {
       childrenColumnName,
       ...expandable,
     },
   };
   return <StyledTable {...sharedProps} />;
   ```


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