Skip to content
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

Merged
merged 1 commit into from Mar 11, 2019

Conversation

MarshallOfSound
Copy link
Member

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 remove label or image dynamically.

Copy link
Member

@codebytere codebytere left a 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!

@MarshallOfSound MarshallOfSound merged commit c7a4532 into master Mar 11, 2019
@release-clerk
Copy link

release-clerk bot commented Mar 11, 2019

Release Notes Persisted

TouchBarSegmentedControl instances now correctly update when you update the segments array and remove label or image dynamically.

@MarshallOfSound MarshallOfSound deleted the fix-segmented-control-update branch March 11, 2019 18:13
@trop
Copy link
Contributor

trop bot commented Mar 11, 2019

I have automatically backported this PR to "5-0-x", please check out #17334

@trop
Copy link
Contributor

trop bot commented Mar 11, 2019

I have automatically backported this PR to "4-0-x", please check out #17335

@trop
Copy link
Contributor

trop bot commented Mar 11, 2019

I have automatically backported this PR to "3-1-x", please check out #17336

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Mar 12, 2019
@sofianguy sofianguy added this to Fixed in 5.0.0-beta.6 in 5.0.x Mar 20, 2019
@sofianguy sofianguy added this to Fixed in 3.1.7 in 3.1.x Mar 29, 2019
kiku-jw pushed a commit to kiku-jw/electron that referenced this pull request May 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
3.1.x
Fixed in 3.1.7
5.0.x
Fixed in 5.0.0-beta.6
Development

Successfully merging this pull request may close these issues.

None yet

2 participants