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

[CheckboxGroup#864] Fix disable checkbox group issue #867

Merged
merged 12 commits into from
Apr 16, 2024

Conversation

aycil-alican
Copy link
Contributor

I fixed disable issue checkbox group.

@aycil-alican aycil-alican changed the title Component/checkbox bug 864 [CheckboxGroup#864] Fix disable checkbox group issue Mar 25, 2024
Copy link
Contributor

@michael-zimmermann michael-zimmermann left a comment

Choose a reason for hiding this comment

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

Some of the changes were done in a separate merge. Could you do a rebase/catch-up merge, so it is clear which changes are only for this PR?

public override var isEnabled: Bool {
didSet{
guard isEnabled != oldValue else { return }
if isEnabled {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure of the logic here. Why can't all the checkboxes be set to enabled as in the disabled states?
If someone enables the whole component, shouldn't it override the status of each single component?

self.checkboxes.forEach { $0.isEnabled == isEnabled }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ex; Checkbox group has 3 item and first item is disable then consumer wants to disable all and enable all in this case first item will be enable but it should be disable

# Conflicts:
#	core/Sources/Components/Checkbox/View/SwiftUI/CheckboxGroupView.swift
@aycil-alican aycil-alican merged commit f229f23 into component/checkbox_bug Apr 16, 2024
4 checks passed
@aycil-alican aycil-alican deleted the component/checkbox_bug_864 branch April 16, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants