dosubot[bot] commented on issue #40430: URL: https://github.com/apache/superset/issues/40430#issuecomment-4542919568
<!-- Answer --> This looks like a valid issue. The `PermissionsField` in [`RoleFormItems.tsx`](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/features/roles/RoleFormItems.tsx#L54-L69) uses the `Select` component from `@superset-ui/core/components` without explicitly setting `popupMatchSelectWidth`. The core Select component doesn't set this prop either [[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx#L680-L742), so the dropdown width falls back to Ant Design's default behavior, which can result in a narrow popup that doesn't match the input field width. A fix would be to add `popupMatchSelectWidth` (set to `true`) on the `<Select>` in the `PermissionsField` component, so the dropdown width matches the trigger input width: ```tsx <Select mode="multiple" name="rolePermissions" popupMatchSelectWidth options={permissions.map(permission => ({ label: permission.label, value: permission.id, }))} getPopupContainer={trigger => trigger.closest('.ant-modal-content')} data-test="permissions-select" /> ``` Note that [PR #38886](https://github.com/apache/superset/pull/38886) previously addressed a similar dropdown width issue in another part of the codebase, and the same pattern could apply here. The `GroupsField` in the same file [[2]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/features/roles/RoleFormItems.tsx#L86-L95) likely has the same problem and should be fixed together. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).* --- Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=42b522ac-a654-424a-8ccb-464ab1c42964) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset) -- 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]
