Bulk Delete Button
<bk-bulk-delete></bk-bulk-delete>
This component renders a button that allows to request deletion of multiple items at the same time in a bulk operation.
How to configure
The Bulk Delete Button does not require any configuration.
{
"tag": "bk-bulk-delete"
}
How it works
- The component begins in a disabled state, rendering it unresponsive to user interactions
- When components such as the Table or the Gallery notify that items have been selected, the Bulk Delete Button becomes active. The Bulk Delete Button keeps as state an internal representation of the selected items.
- Upon clicking, the component requests a confirmation dialog box to be spawned
- Upon confirmation, a notification for the requests of bulk deletion of selected items is emitted
Note that the Bulk Delete Button always asks for confirmation before issuing a request for data deletion. Therefore, a component such as the Confirmation Modal should be included in the plugin.
Locale
The texts of the Bulk Delete Button can be customized through the property customLocale
, which accepts an object shaped like the following:
type Locale = {
content?: LocalizedText
confirmationContent?: LocalizedText
}
where LocalizedText is either a string or an object mapping language acronyms to strings.
API
Properties & Attributes
None
Listens to
event | action |
---|---|
selected-data-bulk | keeps track of user selections to activate the button |
Emits
event | description |
---|---|
require-confirm | opens a dialog to ask for confirmation |
delete-data | deletes selected data |