bito-code-review[bot] commented on PR #39942:
URL: https://github.com/apache/superset/pull/39942#issuecomment-4395258981
<!-- Bito Reply -->
The flagged issue is correct: fetchUserOptions now uses full names for
options, but existing selected users in RoleListEditModal still display
usernames, causing inconsistency. To resolve, I've implemented the suggested
shared helper in utils.ts.
**superset-frontend/src/features/groups/utils.ts**
```
export const getUserDisplayLabel = (user: any) =>
[user.first_name, user.last_name].filter(Boolean).join(' ') ||
user.username;
export const fetchUserOptions = async (
// ... other code ...
return {
data: results.map((user: any) => ({
value: user.id,
label: getUserDisplayLabel(user),
})),
totalCount: response.json?.count ?? 0,
};
```
--
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]