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

   <!-- Bito Reply -->
   The suggestion is valid and should be applied. The current implementation 
uses `closest('.ant-modal-content')`, which can return `null`, leading to 
potential runtime errors when the popup container is not found. To fix this, 
you should modify the `getPopupContainer` callback to provide a fallback 
container, such as `document.body`, ensuring it always returns an 
`HTMLElement`. Here's how you can update the code:
   
   **superset-frontend/src/features/roles/RoleFormItems.tsx**
   ```
   getPopupContainer={trigger => {
     const modalContent = trigger.closest('.ant-modal-content');
     return modalContent || document.body;
   }}
   ```


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