You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sadpandajoe (via GitHub)" <gi...@apache.org> on 2026/08/08 04:34:11 UTC

Re: [PR] fix(select): permission label search matches displayed label (#42041) [superset]

sadpandajoe commented on code in PR #42592:
URL: https://github.com/apache/superset/pull/42592#discussion_r3739990281


##########
superset-frontend/src/features/roles/RoleFormItems.tsx:
##########
@@ -60,6 +60,13 @@ export const PermissionsField = ({
         placeholder={t('Select permissions')}
         options={options}
         loading={loading}
+        // fetchPermissionOptions already filters server-side against the raw
+        // permission/view_menu names. AsyncSelect's default client-side
+        // re-filter checks the search term against the rendered label, but
+        // that label has had underscores replaced with spaces
+        // (formatPermissionLabel), so a raw-name search term never matches
+        // it and the correctly-fetched option gets hidden. See #42041.
+        filterOption={false}

Review Comment:
   Agreed—this also fires on the first search in the edit flow: all existing role permissions are injected into the options and sorted selected-first, and disabling filtering keeps that entire block ahead of the server matches. Could this use an underscore-normalizing predicate instead of disabling client filtering?



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org