-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[ResourceList] Multiselect #1261
Conversation
Re-pinging @alex-page and @dleroux for this one, as it's been quiet for a little while |
Sorry for the delay on this. Do you mind rebasing and pinging me again @AndrewMusgrave ? |
@@ -533,6 +537,7 @@ export class ResourceList extends React.Component<CombinedProps, State> { | |||
const resourceListClassName = classNames( | |||
styles.ResourceList, | |||
loading && styles.disabledPointerEvents, | |||
selectMode && styles.disableTextSelection, |
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.
what was happening without this?
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.
You'll select text when multi-selecting, really bad experience 😬
checked={selected} | ||
disabled={loading} | ||
/> | ||
<span onChange={this.handleLargerSelectionArea}> |
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.
Our Checkbox renders block elements so probably best to make this a div.
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.
Nice catch, I'll change this on Monday and merge 🚢
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.
🎩 looks good. Just a small change request on the mark-up, after that 🐑 🇮🇹
Before I 🚢 , @alex-page what do you think? |
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.
Great work @AndrewMusgrave, make sure the id's on the items are unique compared to the other examples otherwise you will get an accessibility issue.
Change div to span for accessible markup
WHY are these changes introduced?
Add multi-select to
ResourceList
Fixes: #935
WHAT is this pull request doing?
Video
https://cl.ly/9e5e755caa40
How to 🎩
Copy-paste this code in
playground/Playground.tsx
: