New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: remove label/image from segment if they are mutated to null #17323
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wish there was a way to test this but logically it looks sound!
Release Notes Persisted
|
I have automatically backported this PR to "5-0-x", please check out #17334 |
I have automatically backported this PR to "4-0-x", please check out #17335 |
I have automatically backported this PR to "3-1-x", please check out #17336 |
Description of Change
The way we manage segmented controls is mutating them in place to match the new properties. This had issues when "label" or "image" wasn't just changed, rather completely removed / reset to
null
.This PR updates the logic to handle the null/undefined cases.
Fixes #17322
Notes: TouchBarSegmentedControl instances now correctly update when you update the
segments
array and removelabel
orimage
dynamically.