2015-10-03 01:57:40 +08:00
---
layout: docs
title: MultiselectActionBar
2015-10-04 04:56:58 +08:00
edit_url: "https://github.com/nylas/N1/blob/master/src/components/multiselect-action-bar.cjsx"
2015-10-03 01:57:40 +08:00
---
2015-10-02 03:34:16 +08:00
2015-10-03 01:57:40 +08:00
< h2 > Summary< / h2 >
2015-10-02 03:34:16 +08:00
2015-10-03 01:57:40 +08:00
< div class = "markdown-from-sourecode" >
< p > < p > MultiselectActionBar is a simple component that can be placed in a {Sheet} Toolbar.
2015-10-02 03:34:16 +08:00
When the provided < code > dataStore< / code > has a selection, it appears over the other items in the toolbar.< / p >
2015-10-03 01:57:40 +08:00
< p > Generally, you wrap < a href = 'multiselectactionbar.html' > MultiselectActionBar< / a > in your own simple component to provide a dataStore
2015-10-02 03:34:16 +08:00
and other settings:< / p >
< pre > < code class = "lang-coffee" > < span class = "hljs-class" > < span class = "hljs-keyword" > class< / span > < span class = "hljs-title" > MultiselectActionBar< / span > < span class = "hljs-keyword" > < span class = "hljs-keyword" > extends< / span > < / span > < span class = "hljs-title" > React< / span > .< span class = "hljs-title" > Component< / span >
< / span > < span class = "hljs-annotation" > @displayName< / span > : < span class = "hljs-symbol" > 'MultiselectActionBa< / span > r'
render: =>
< < span class = "hljs-type" > MultiselectActionBar< / span >
dataStore={< span class = "hljs-type" > ThreadListStore< / span > }
className=< span class = "hljs-string" > "thread-list"< / span >
collection=< span class = "hljs-string" > "thread"< / span > />
< / code > < / pre >
< p > The MultiselectActionBar uses the < code > ComponentRegistry< / code > 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:< / p >
2015-10-03 07:10:51 +08:00
< pre > < code class = "lang-coffee" > < span class = "hljs-tag" > ComponentRegistry< / span > < span class = "hljs-class" > .register< / span > < span class = "hljs-tag" > ThreadBulkRemoveButton< / span > ,
< span class = "hljs-rule" > < span class = "hljs-attribute" > role< / span > :< span class = "hljs-value" > < span class = "hljs-string" > 'thread:BulkAction'< / span > < / span > < / span >
2015-10-02 03:34:16 +08:00
< / code > < / pre >
< / p >
< / div >
2015-10-03 01:57:40 +08:00
< ul >
< / ul >
< h3 > Class Properties< / h3 >
< h4 id = propTypes > propTypes < a href = "#propTypes" class = "link" > < / a > < / h4 >
< p > < p > React < code > props< / code > supported by MultiselectActionBar:< / p >
< / p >
< table class = "arguments" >
< tr >
< td style = "width:15%;" >
< em > dataStore< / em >
< / td >
< td >
2015-10-04 04:56:58 +08:00
2015-10-03 01:57:40 +08:00
< p > An instance of a {ModelView}.< / p >
2015-10-04 04:56:58 +08:00
2015-10-03 01:57:40 +08:00
< / td >
< / tr >
< tr >
< td style = "width:15%;" >
< em > collection< / em >
< / td >
< td >
2015-10-04 04:56:58 +08:00
2015-10-03 01:57:40 +08:00
< p > 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 (< code > thread< / code > => < code > thread:BulkAtion< / code > )< / p >
2015-10-04 04:56:58 +08:00
2015-10-03 01:57:40 +08:00
< / td >
< / tr >
< / table >