-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
feat: card view bulk select #10607
feat: card view bulk select #10607
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,6 +142,7 @@ interface CardProps { | |
coverLeft?: React.ReactNode; | ||
coverRight?: React.ReactNode; | ||
actions: React.ReactNode; | ||
bulkSelectEnabled?: boolean; | ||
} | ||
|
||
function ListViewCard({ | ||
|
@@ -154,12 +155,13 @@ function ListViewCard({ | |
coverLeft, | ||
coverRight, | ||
actions, | ||
bulkSelectEnabled, | ||
}: CardProps) { | ||
return ( | ||
<StyledCard | ||
cover={ | ||
<Cover> | ||
<a href={url}> | ||
<a href={bulkSelectEnabled ? undefined : url}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we move this logic up into the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alternatively, we may just be able to do a e.preventDefault();
e.stopPropagation(); in the CardWrapper's onClick handler, when bulkSelect is enabled, to prevent events from triggering on the children. |
||
<GradientContainer> | ||
<CardCoverImg | ||
src={imgURL} | ||
|
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.
We should probably check to see if
bulkSelectEnabled
before firing this. Like this, I think it's possible to select cards even if bulkSelect is not enabled.