-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
DataViews: Type the BulkActions component #61666
Changes from all 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 |
---|---|---|
|
@@ -104,7 +104,7 @@ export const deleteAction = { | |
}, | ||
hideModalHeader: true, | ||
supportsBulk: true, | ||
RenderModal: ( { items, closeModal, onPerform } ) => { | ||
RenderModal: ( { items, closeModal, onActionPerformed } ) => { | ||
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. If I'm not wrong, this was a bug too. I see that all actions everywhere in dataviews use 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. Yes, it seems it was a bug. |
||
const { __experimentalDeleteReusableBlock } = | ||
useDispatch( reusableBlocksStore ); | ||
const { createErrorNotice, createSuccessNotice } = | ||
|
@@ -191,8 +191,8 @@ export const deleteAction = { | |
} else { | ||
deletePattern(); | ||
} | ||
if ( onPerform ) { | ||
onPerform(); | ||
if ( onActionPerformed ) { | ||
onActionPerformed(); | ||
} | ||
closeModal(); | ||
}; | ||
|
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.
isEligible is not mandatory in actions (you can check that in other components). So typing this component actually highlights that this case was not being considered. So this should be a fix.
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.
Good catch 👍