massucattoj opened a new pull request, #40571:
URL: https://github.com/apache/superset/pull/40571
### SUMMARY
In Dashboard Properties → Access & ownership, removing one owner caused the
remaining owner chip(s) to re-render as `undefined undefined` instead of their
actual name.
Root cause: `handleOnChangeOwners` rebuilt every owner object from antd's
onChange payload, but the option objects passed for already-selected items
don't carry the custom `OWNER_TEXT_LABEL_PROP` /
`OWNER_EMAIL_PROP` props. So `full_name` collapsed to `''`, and
`getOwnerName` fell back to `` `${first_name} ${last_name}` `` where both were
undefined.
Fix: in `handleOnChangeOwners`, look up each owner by id in the previous
state and preserve the original object when it already exists. Only newly added
owners get derived from the option payload (existing
behavior).
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
**Before:** Remaining chip renders as `undefined undefined`.
<img width="539" height="710" alt="Screenshot 2026-05-31 at 23 09 57"
src="https://github.com/user-attachments/assets/46b8c293-089a-4c79-8731-e35574c47329"
/>
<img width="570" height="720" alt="Screenshot 2026-05-31 at 23 10 07"
src="https://github.com/user-attachments/assets/c158c0fe-f35b-4c8e-9618-d65e658453e1"
/>
**After:** Remaining chip keeps the correct name.
<img width="620" height="737" alt="Screenshot 2026-05-31 at 23 08 01"
src="https://github.com/user-attachments/assets/156996ff-7d6d-4a71-b95f-4acc9929a927"
/>
<img width="559" height="735" alt="Screenshot 2026-05-31 at 23 08 13"
src="https://github.com/user-attachments/assets/57440030-b188-40f2-b55f-6a1e589eca7d"
/>
### TESTING INSTRUCTIONS
1. Open a dashboard's Properties modal (you'll need 2+ users in the system).
2. Expand Access & ownership and add a second owner. Save.
3. Reopen Properties → Access & ownership. Click the `x` on one of the owner
chips.
4. Confirm the remaining chip still shows the owner's name (not `undefined
undefined`).
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [x] Changes UI
- [ ] Includes DB Migration
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
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]