--- layout: docs title: MultiselectActionBar edit_url: "https://github.com/nylas/N1/blob/master/src/components/multiselect-action-bar.cjsx" ---

Summary

MultiselectActionBar is a simple component that can be placed in a {Sheet} Toolbar. When the provided dataStore has a selection, it appears over the other items in the toolbar.

Generally, you wrap MultiselectActionBar in your own simple component to provide a dataStore and other settings:

class MultiselectActionBar extends React.Component
  @displayName: 'MultiselectActionBar'

  render: =>
    <MultiselectActionBar
      dataStore={ThreadListStore}
      className="thread-list"
      collection="thread" />

The MultiselectActionBar uses the ComponentRegistry to find items to display for the given collection name. To add an item to the bar created in the example above, register it like this:

ComponentRegistry.register ThreadBulkRemoveButton,
  role: 'thread:BulkAction'

Class Properties

propTypes

React props supported by MultiselectActionBar:

dataStore

An instance of a {ModelView}.

collection

The name of the collection. The collection name is used for the text that appears in the bar "1 thread selected" and is also used to find components in the component registry that should appear in the bar (thread => thread:BulkAtion)