Skip to main content
Version: 13.x (Current)

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

  1. The component begins in a disabled state, rendering it unresponsive to user interactions
  2. 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.
  3. Upon clicking, the component requests a confirmation dialog box to be spawned
  4. 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

eventaction
selected-data-bulkkeeps track of user selections to activate the button

Emits

eventdescription
require-confirmopens a dialog to ask for confirmation
delete-datadeletes selected data