List views in the Admin UI support bulk actions, which are performed on any selected items in the list. There are a default set of bulk actions that are defined by the Admin UI itself (e.g. delete, assign to channels), but using the @vendure/ui-devit package you are also able to define your own bulk actions.
Use cases for bulk actions include things like:
Bulk actions are declared using the registerBulkAction function
Sometimes a bulk action only makes sense in certain circumstances. For example, the "assign to channel" action only makes sense when your server has multiple channels set up.
We can conditionally control the display of a bulk action with the isVisible function, which should return a Promise resolving to a boolean: