react-bootstrap-table2/docs/row-select-props.html
2018-03-07 00:00:10 +08:00

153 lines
23 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<html lang="en"><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Row Selection Props · react-bootstrap-table2</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta property="og:title" content="Row Selection Props · react-bootstrap-table2"/><meta property="og:type" content="website"/><meta property="og:url" content="https://react-bootstrap-table.github.io/react-bootstrap-table2/index.html"/><meta property="og:description" content="Following we list all props for [`selectRow` props](./table-props.html#selectrow-object)"/><link rel="shortcut icon" href="/react-bootstrap-table2/undefined"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><link rel="alternate" type="application/atom+xml" href="https://react-bootstrap-table.github.io/blog/atom.xml" title="react-bootstrap-table2 Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://react-bootstrap-table.github.io/blog/feed.xml" title="react-bootstrap-table2 Blog RSS Feed"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/react-bootstrap-table2/css/main.css"/></head><body class="sideNavVisible"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/react-bootstrap-table2/"><h2 class="headerTitle">react-bootstrap-table2</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li><a href="/react-bootstrap-table2/docs/about.html" target="_self">Docs</a></li><li><a href="/react-bootstrap-table2/docs/table-props.html" target="_self">API</a></li><li><a href="/react-bootstrap-table2/en/help.html" target="_self">Help</a></li><li><a href="/react-bootstrap-table2/blog" target="_self">Blog</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i></i><span>Row Select Definitation</span></h2></div><div class="navGroups"><div class="navGroup navGroupActive"><h3>Table Definitation</h3><ul><li class="navListItem"><a class="navItem" href="/react-bootstrap-table2/docs/table-props.html">BootstrapTable Props</a></li></ul></div><div class="navGroup navGroupActive"><h3>Column Definitation</h3><ul><li class="navListItem"><a class="navItem" href="/react-bootstrap-table2/docs/column-props.html">Columns Props</a></li></ul></div><div class="navGroup navGroupActive"><h3>Cell Editing Definitation</h3><ul><li class="navListItem"><a class="navItem" href="/react-bootstrap-table2/docs/cell-edit-props.html">Cell Editing Props</a></li></ul></div><div class="navGroup navGroupActive"><h3>Pagination Definitation</h3><ul><li class="navListItem"><a class="navItem" href="/react-bootstrap-table2/docs/pagination-props.html">Pagination Props</a></li></ul></div><div class="navGroup navGroupActive"><h3>Row Select Definitation</h3><ul><li class="navListItem navListItemActive"><a class="navItem navItemActive" href="/react-bootstrap-table2/docs/row-select-props.html">Row Selection Props</a></li></ul></div><div class="navGroup navGroupActive"><h3>Column Filter Definitation</h3><ul><li class="navListItem"><a class="navItem" href="/react-bootstrap-table2/docs/filter-props.html">Column Filter Props</a></li></ul></div></div></section></div><script>
var toggler = document.getElementById('navToggler');
var nav = document.getElementById('docsNav');
toggler.onclick = function() {
nav.classList.toggle('docsSliderActive');
};
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><h1>Row Selection Props</h1></header><article><div><span><p>Following we list all props for <a href="./table-props.html#selectrow-object"><code>selectRow</code> props</a></p>
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> selectRow = {
<span class="hljs-attr">mode</span>: <span class="hljs-string">'checkbox'</span>,
...
});
<span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">BootstrapTable</span> <span class="hljs-attr">selectRow</span>=<span class="hljs-string">{</span> <span class="hljs-attr">selectRow</span> } <span class="hljs-attr">...</span> /&gt;</span>
</span></code></pre>
<h2><a class="anchor" aria-hidden="true" name="required"></a><a href="#required" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Required</h2>
<ul>
<li><a href="#selectrowmode-string">mode (<strong>required</strong>)</a></li>
</ul>
<h2><a class="anchor" aria-hidden="true" name="optional"></a><a href="#optional" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Optional</h2>
<ul>
<li><a href="#selectrowselected-array">selected</a></li>
<li><a href="#selectrowstyle-object-function">style</a></li>
<li><a href="#selectrowclasses-string-function">classes</a></li>
<li><a href="#selectrowbgcolor-string-function">bgColor</a></li>
<li><a href="#selectrownonselectable-array">nonSelectable</a></li>
<li><a href="#selectrowclicktoselect-bool">clickToSelect</a></li>
<li><a href="#selectrowclicktoedit-bool">clickToEdit</a></li>
<li><a href="#selectrowonselect-function">onSelect</a></li>
<li><a href="#selectrowonselectall-function">onSelectAll</a></li>
<li><a href="#selectrowhideselectcolumn-bool">hideSelectColumn</a></li>
</ul>
<hr>
<h2><a class="anchor" aria-hidden="true" name="selectrowmode-string"></a><a href="#selectrowmode-string" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>selectRow.mode - [String]</h2>
<p>Specifying the selection way for <code>single(radio)</code> or <code>multiple(checkbox)</code>. If <code>radio</code> was assigned, there will be a radio button in the selection column; otherwise, the <code>checkbox</code> instead.</p>
<h3><a class="anchor" aria-hidden="true" name="available-values"></a><a href="#available-values" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Available values</h3>
<ul>
<li><strong>radio</strong></li>
<li><strong>checkbox</strong></li>
</ul>
<p>Following is a quick example for single selection:</p>
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> selectRow = {
<span class="hljs-attr">mode</span>: <span class="hljs-string">'radio'</span> <span class="hljs-comment">// single row selection</span>
};
<span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">BootstrapTable</span>
<span class="hljs-attr">keyField</span>=<span class="hljs-string">'id'</span>
<span class="hljs-attr">data</span>=<span class="hljs-string">{</span> <span class="hljs-attr">products</span> }
<span class="hljs-attr">columns</span>=<span class="hljs-string">{</span> <span class="hljs-attr">columns</span> }
<span class="hljs-attr">selectRow</span>=<span class="hljs-string">{</span> <span class="hljs-attr">selectRowProp</span> }
/&gt;</span>
</span></code></pre>
<h2><a class="anchor" aria-hidden="true" name="selectrowselected-array"></a><a href="#selectrowselected-array" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>selectRow.selected - [Array]</h2>
<p><code>selectRow.selected</code> allow you have default selections on table.</p>
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> selectRow = {
<span class="hljs-attr">mode</span>: <span class="hljs-string">'checkbox'</span>,
<span class="hljs-attr">selected</span>: [<span class="hljs-number">1</span>, <span class="hljs-number">3</span>] <span class="hljs-comment">// should be a row keys array</span>
};
</code></pre>
<h2><a class="anchor" aria-hidden="true" name="selectrowstyle-object-function"></a><a href="#selectrowstyle-object-function" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>selectRow.style - [Object | Function]</h2>
<p><code>selectRow.style</code> allow you to have custom style on selected rows:</p>
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> selectRow = {
<span class="hljs-attr">mode</span>: <span class="hljs-string">'checkbox'</span>,
<span class="hljs-attr">style</span>: { <span class="hljs-attr">background</span>: <span class="hljs-string">'red'</span> }
};
</code></pre>
<p>If you wanna more flexible customization, <code>selectRow.style</code> also accept a function:</p>
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> selectRow = {
<span class="hljs-attr">mode</span>: <span class="hljs-string">'checkbox'</span>,
<span class="hljs-attr">style</span>: <span class="hljs-function">(<span class="hljs-params">row, rowIndex</span>) =&gt;</span> { <span class="hljs-keyword">return</span> ...; }
};
</code></pre>
<h2><a class="anchor" aria-hidden="true" name="selectrowclasses-string-function"></a><a href="#selectrowclasses-string-function" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>selectRow.classes - [String | Function]</h2>
<p><code>selectRow.classes</code> allow you to add css class on selected rows:</p>
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> selectRow = {
<span class="hljs-attr">mode</span>: <span class="hljs-string">'checkbox'</span>,
<span class="hljs-attr">classes</span>: <span class="hljs-string">'custom-class'</span>
};
</code></pre>
<p>If you wanna more flexible customization, <code>selectRow.classes</code> also accept a function:</p>
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> selectRow = {
<span class="hljs-attr">mode</span>: <span class="hljs-string">'checkbox'</span>,
<span class="hljs-attr">classes</span>: <span class="hljs-function">(<span class="hljs-params">row, rowIndex</span>) =&gt;</span> { <span class="hljs-keyword">return</span> ...; }
};
</code></pre>
<h2><a class="anchor" aria-hidden="true" name="selectrowbgcolor-string-function"></a><a href="#selectrowbgcolor-string-function" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>selectRow.bgColor - [String | Function]</h2>
<p>A quick way to specify the backgroud color when row is selected</p>
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> selectRow = {
<span class="hljs-attr">mode</span>: <span class="hljs-string">'checkbox'</span>,
<span class="hljs-attr">bgColor</span>: <span class="hljs-string">'red'</span>
};
</code></pre>
<p>There's also a more good way to custom it:</p>
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> selectRow = {
<span class="hljs-attr">mode</span>: <span class="hljs-string">'checkbox'</span>,
<span class="hljs-attr">bgColor</span>: <span class="hljs-function">(<span class="hljs-params">row, rowIndex</span>) =&gt;</span> {
<span class="hljs-keyword">return</span> ....; <span class="hljs-comment">// return a color code</span>
}
};
</code></pre>
<h2><a class="anchor" aria-hidden="true" name="selectrownonselectable-array"></a><a href="#selectrownonselectable-array" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>selectRow.nonSelectable - [Array]</h2>
<p>This prop allow you to restrict some rows which can not be selected by user. <code>selectRow.nonSelectable</code> accept an rowkeys array.</p>
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> selectRow = {
<span class="hljs-attr">mode</span>: <span class="hljs-string">'checkbox'</span>,
<span class="hljs-attr">nonSelectable</span>: [<span class="hljs-number">1</span>, <span class="hljs-number">3</span> ,<span class="hljs-number">5</span>]
};
</code></pre>
<h2><a class="anchor" aria-hidden="true" name="selectrowclicktoselect-bool"></a><a href="#selectrowclicktoselect-bool" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>selectRow.clickToSelect - [Bool]</h2>
<p>Allow user to select row by clicking on the row.</p>
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> selectRow = {
<span class="hljs-attr">mode</span>: <span class="hljs-string">'checkbox'</span>,
<span class="hljs-attr">clickToSelect</span>: <span class="hljs-literal">true</span>
};
</code></pre>
<blockquote>
<p>Note: When you also enable <a href="./cell-edit-props.html">cellEdit</a>, the <code>selectRow.clickToSelect</code> will deactivate the functionality of cell editing. If you want to click on row to select row and edit cell simultaneously, you are suppose to enable <a href="#selectrowclicktoedit-bool"><code>selectRow.clickToEdit</code></a></p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" name="selectrowclicktoedit-bool"></a><a href="#selectrowclicktoedit-bool" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>selectRow.clickToEdit - [Bool]</h2>
<p>Able to click to edit cell and select row at the same time.</p>
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> selectRow = {
<span class="hljs-attr">mode</span>: <span class="hljs-string">'checkbox'</span>,
<span class="hljs-attr">clickToSelect</span>: <span class="hljs-literal">true</span>
clickToEdit: <span class="hljs-literal">true</span>
};
</code></pre>
<h2><a class="anchor" aria-hidden="true" name="selectrowonselect-function"></a><a href="#selectrowonselect-function" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>selectRow.onSelect - [Function]</h2>
<p>This callback function will be called when a row is select/unselect and pass following three arguments:
<code>row</code>, <code>isSelect</code> and <code>rowIndex</code>.</p>
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> selectRow = {
<span class="hljs-attr">mode</span>: <span class="hljs-string">'checkbox'</span>,
<span class="hljs-attr">onSelect</span>: <span class="hljs-function">(<span class="hljs-params">row, isSelect, rowIndex</span>) =&gt;</span> {
<span class="hljs-comment">// ...</span>
}
};
</code></pre>
<h2><a class="anchor" aria-hidden="true" name="selectrowonselectall-function"></a><a href="#selectrowonselectall-function" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>selectRow.onSelectAll - [Function]</h2>
<p>This callback function will be called when select/unselect all and it only work when you configure <a href="#selectrowmode-string"><code>selectRow.mode</code></a> as <code>checkbox</code>.</p>
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> selectRow = {
<span class="hljs-attr">mode</span>: <span class="hljs-string">'checkbox'</span>,
<span class="hljs-attr">onSelectAll</span>: <span class="hljs-function">(<span class="hljs-params">isSelect, results</span>) =&gt;</span> {
<span class="hljs-comment">// ...</span>
}
};
</code></pre>
<h2><a class="anchor" aria-hidden="true" name="selectrowhideselectcolumn-bool"></a><a href="#selectrowhideselectcolumn-bool" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>selectRow.hideSelectColumn - [Bool]</h2>
<p>Default is <code>false</code>, if you don't want to have a selection column, give this prop as <code>true</code></p>
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> selectRow = {
<span class="hljs-attr">mode</span>: <span class="hljs-string">'radio'</span>,
<span class="hljs-attr">hideSelectColumn</span>: <span class="hljs-literal">true</span>,
<span class="hljs-attr">clickToSelect</span>: <span class="hljs-literal">true</span>,
<span class="hljs-attr">bgColor</span>: <span class="hljs-string">'red'</span>
};
</code></pre>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="pagination-props.html">← Pagination Props</a><a class="docs-next button" href="filter-props.html">Column Filter Props →</a></div></div></div></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/react-bootstrap-table2/" class="nav-home"></a><div><h5>Docs</h5><a href="/react-bootstrap-table2/docs/en/getting-started.html">Getting Started</a><a href="/react-bootstrap-table2/docs/en/table-props.html">API References</a></div><div><h5>Community</h5><a href="https://stackoverflow.com/questions/tagged/react-bootstrap-table" target="_blank">Stack Overflow</a><a href="https://discordapp.com/">Project Chat</a><a href="https://twitter.com/" target="_blank">Twitter</a></div><div><h5>More</h5><a href="/react-bootstrap-table2/blog/index.html">Blog</a><a href="https://github.com/react-bootstrap-table/react-bootstrap-table2">GitHub</a><a class="github-button" href="https://github.com/react-bootstrap-table/react-bootstrap-table2" data-icon="octicon-star" data-count-href="/facebook/docusaurus/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub">Star</a></div></section><section class="copyright">Copyright © 2018 react-bootstrap-table2.</section></footer></div></body></html>