-
Notifications
You must be signed in to change notification settings - Fork 54
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
Added new prop: keepSelectionOrder #162
base: master
Are you sure you want to change the base?
Added new prop: keepSelectionOrder #162
Conversation
What do you think of this one ? |
); | ||
} | ||
|
||
destinationItems = selectedItems.filter( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you find case when destinationItems is not empty? becouse I can't find use case for it, I think it's redundancy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I haven't. Since it was some legacy code, I was frightened to remove it.
if (keepSelectionOrder) { | ||
// In order to keep selection order on the list, | ||
// First, iterate threw already selectedItems | ||
alreadySelectedItems = selectedItems.filter(item => findItem(item, items)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- alreadySelectedItems is the same that contains in selectedItems, I think doesn't make seanse to do such filtering
- your fix doesn't work when I use selection with Shift
I am ok, but we need to be sure that we will cover all use cases, |
c50759b
to
678755e
Compare
Feature
Proposed Changes