Skip to main content

BulkActions

Import​

import { BulkActions } from '@resultadosdigitais/tangram-components'

Properties​

children​

Typenode
Defaultnull

Description​

Sets the children.

onClear​

Typefunc
Paramevent React.SyntheticEvent - The event source of the callback.

Description​

Callback fired when the clear button is clicked.

onSelectAll​

Typefunc
Paramevent React.SyntheticEvent - The event source of the callback.
Paramchecked boolean - The value of event.target.checked

Description​

Callback fired when the select all option is checked.

showSelectAll​

Typebool
Defaultfalse

Description​

Sets if show the select all option.

selectAll​

Typebool
Defaultfalse

Description​

Sets if select all is enabled.

totalSelected​

Typenumber

Description​

Sets the total selected items.

total​

Typenumber

Description​

Sets the total items.

clearLabel​

Typestring | func
DefaultBulkActions.translations.en.clear
Paramargs object - Object with information available for rendering the information in case the attribute value is a function.
  • args.total number - The total of items.
  • args.totalSelected number - The number of items selected.

Description​

Custom text for the clear button.

Preset values for English, Brazilian Portuguese and Spanish are available in BulkActions.translations.en.clear, BulkActions.translations.ptBR.clear and BulkActions.translations.es.clear.

// Can be a string:
clearLabel="Clear selection of {totalSelected} items"

// Or a function (that returns a string):
clearLabel={({ total, totalSelected }) => `Clear selection of ${totalSelected} items`}

totalSelectedLabel​

Typestring | func
DefaultBulkActions.translations.en.totalSelected
Paramargs object - Object with information available for rendering the information in case the attribute value is a function.
  • args.total number - The total of items.
  • args.totalSelected number - The number of items selected.

Description​

Custom text for the total selected items.

Preset values for English, Brazilian Portuguese and Spanish are available in BulkActions.translations.en.totalSelected, BulkActions.translations.ptBR.totalSelected and BulkActions.translations.es.totalSelected.

// Can be a string:
totalSelectedLabel="{totalSelected} items"

// Or a function (that returns a string):
totalSelectedLabel={({ total, totalSelected }) => `${totalSelected} items`}

selectAllLabel​

Typestring | func
DefaultBulkActions.translations.en.selectAll
Paramargs object - Object with information available for rendering the information in case the attribute value is a function.
  • args.total number - The total of items.
  • args.totalSelected number - The number of items selected.

Description​

Custom text for the select all button.

Preset values for English, Brazilian Portuguese and Spanish are available in BulkActions.translations.en.selectAll, BulkActions.translations.ptBR.selectAll and BulkActions.translations.es.selectAll.

// Can be a string:
selectAllLabel="Select all {total} items"

// Or a function (that returns a string):
selectAllLabel={({ total, totalSelected }) => `Select all ${total} items`}

Feedback​