-
Notifications
You must be signed in to change notification settings - Fork 352
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(DualList): de-Select items after the transition between lists. #1178
fix(DualList): de-Select items after the transition between lists. #1178
Conversation
PatternFly-React preview: https://1178-pr-patternfly-react-patternfly.surge.sh |
Pull Request Test Coverage Report for Build 3960
💛 - Coveralls |
@@ -38,22 +38,34 @@ export const makeAllItemsVisible = list => | |||
export const sortItems = (items, sortFactor = 'label') => | |||
items.sort((a, b) => (a[sortFactor].toLowerCase() > b[sortFactor].toLowerCase() ? 1 : -1)); | |||
|
|||
export const arrangeArray = ({ items, sortBy, isSortAsc = true, isMainChecked = false }) => { | |||
export const shouldItemBeChecked = ({ item, resetAllSelected, isMainChecked }) => { |
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.
why take a object with three fields rather than 3 parameters?
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.
oops, copy-pasted it from another function signature with a lot of properties,
I don't mind changing it,
btw from what number of arguments do we usually provide objects instead?
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.
I'm not sure we ever should in helper functions
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 problem, opening a PR to refactor that.
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.
Added the refactor PR now
74f6778
to
88271b5
Compare
After items were moved between the lists,
they should not be selected as specified in the design.