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: Selecting a group may cause selection of duplicate items (#945) #969

Merged
merged 2 commits into from
Apr 27, 2019
Merged

fix: Selecting a group may cause selection of duplicate items (#945) #969

merged 2 commits into from
Apr 27, 2019

Conversation

akki-jat
Copy link
Collaborator

@@ -560,7 +560,9 @@ export default {

this.$emit('input', newValue, this.id)
} else {
const optionsToAdd = group[this.groupValues].filter(not(this.isOptionDisabled || this.isSelected))
Copy link
Collaborator Author

@akki-jat akki-jat Apr 19, 2019

Choose a reason for hiding this comment

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

The problem here was that not function takes a function as parameter and as the name suggests performs not operation on it's response and we were passing two functions separated by pipe as parameter so it always takes first function - isOptionDisabled (takes second function - isSelected only when first function is null / undefined - which is not the case here)

@akki-jat akki-jat mentioned this pull request Apr 19, 2019
@shentao
Copy link
Owner

shentao commented Apr 27, 2019

This looks amazing! Thanks a lot for also including a test for it. Really appreciate it. Gonna make a release today.

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.

Selecting a group may cause selection of duplicate items
2 participants