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(ColorPicker): unable to set R/G/B components as 0 #4466

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

plagoa
Copy link
Contributor

@plagoa plagoa commented Dec 4, 2024

value of 0 was being interpreted as false

@plagoa plagoa requested a review from a team as a code owner December 4, 2024 10:52
@plagoa plagoa requested review from zettca and MEsteves22 and removed request for a team December 4, 2024 10:52
@github-actions github-actions bot temporarily deployed to uikit/pr-4466 December 4, 2024 10:57 Destroyed
@github-actions github-actions bot temporarily deployed to uikit-docs/pr-4466 December 4, 2024 10:57 Destroyed
Comment on lines 98 to 100
r: data.r !== undefined ? data.r : rgb?.r,
g: data.g !== undefined ? data.g : rgb?.g,
b: data.b !== undefined ? data.b : rgb?.b,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have syntax for this case

Suggested change
r: data.r !== undefined ? data.r : rgb?.r,
g: data.g !== undefined ? data.g : rgb?.g,
b: data.b !== undefined ? data.b : rgb?.b,
r: data.r ?? rgb?.r,
g: data.g ?? rgb?.g,
b: data.b ?? rgb?.b,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course. Updated.

@plagoa plagoa force-pushed the fix/color_picker_rgb branch from 45f722b to 9d33712 Compare December 4, 2024 11:54
@github-actions github-actions bot temporarily deployed to uikit/pr-4466 December 4, 2024 11:59 Destroyed
@zettca zettca merged commit 4d40f7f into master Dec 4, 2024
12 checks passed
@zettca zettca deleted the fix/color_picker_rgb branch December 4, 2024 13:05
@zettca zettca linked an issue Dec 4, 2024 that may be closed by this pull request
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Color Picker - unable to fill "0" in R/G/B fields
2 participants