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

remove boolean flip to prevent it being negated twice #39

Closed
wants to merge 1 commit into from
Closed

remove boolean flip to prevent it being negated twice #39

wants to merge 1 commit into from

Conversation

Polymeta
Copy link
Collaborator

this moves the boolean change into the else case, because when you call selectAll() with isAllSelected = true right now, it will then call clearSelected, which is fine. However, inside that method, the isAllSelected boolean will get set to false already, once its done and the flow goes back to the selectAll(), we can see that after if/else the boolean is flipped again causing the selectAll to not work once all have been selected

to reproduce the error try the following:

In playground:

  1. go to multiselect
  2. Enable "multiple"
  3. Select "toggle all"
  4. Trying selecting it again to unselect all and observe this not working

this moves the boolean change into the else case, because when you call selectAll() with isAllSelected = true right now, it will then call clearSelected, which is fine. However, inside that method, the isAllSelected boolean will get set to false already, once its done and the flow goes back to the selectAll(), we can see that after if/else the boolean is flipped *again* causing the selectAll to not work once all have been selected
@Polymeta
Copy link
Collaborator Author

I dont think the workflow failing doesn't have to do with the code? Not sure

@TomSmith27
Copy link
Collaborator

I think its cause your not a contributor, ive added you, just need to accept

@Polymeta
Copy link
Collaborator Author

Hm, same error even after accepting the invite, maybe it needs time to like refresh or something?

@Polymeta
Copy link
Collaborator Author

Yeah, no dice, maybe it works if someone else starts the workflow?

@TomSmith27
Copy link
Collaborator

Looks like its cause your code is in a fork, not sure
marocchino/sticky-pull-request-comment#227

@TomSmith27
Copy link
Collaborator

Yeah, no dice, maybe it works if someone else starts the workflow?

Can you remake the request in this repo

@Polymeta
Copy link
Collaborator Author

moved to #40

@Polymeta Polymeta closed this Jan 27, 2023
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.

2 participants