mirror of
https://github.com/gosticks/react-bootstrap-table2.git
synced 2026-10-06 18:16:54 +00:00
20181221 release
This commit is contained in:
@@ -101,23 +101,31 @@
|
||||
};
|
||||
</code></pre>
|
||||
<h2><a class="anchor" aria-hidden="true" name="expandrowexpandcolumnrenderer-function"></a><a href="#expandrowexpandcolumnrenderer-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>expandRow.expandColumnRenderer - [Function]</h2>
|
||||
<p>Provide a callback function which allow you to custom the expand indicator. This callback only have one argument which is an object and contain one property <code>expanded</code> to indicate if current row is expanded</p>
|
||||
<p>Provide a callback function which allow you to custom the expand indicator. This callback only have one argument which is an object and contain these properties:</p>
|
||||
<ul>
|
||||
<li><code>expanded</code>: If current row is expanded or not</li>
|
||||
<li><code>rowKey</code>: Current row key</li>
|
||||
<li><code>expandable</code>: If currnet row is expandable or not</li>
|
||||
</ul>
|
||||
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> expandRow = {
|
||||
<span class="hljs-attr">renderer</span>: <span class="hljs-function">(<span class="hljs-params">row</span>) =></span> ...,
|
||||
<span class="hljs-attr">showExpandColumn</span>: <span class="hljs-literal">true</span>,
|
||||
<span class="hljs-attr">expandColumnRenderer</span>: <span class="hljs-function">(<span class="hljs-params">{ expanded }</span>) =></span> (
|
||||
<span class="hljs-attr">renderer</span>: <span class="hljs-function">(<span class="hljs-params">row</span>) =></span> ...
|
||||
expandColumnRenderer: <span class="hljs-function">(<span class="hljs-params">{ expanded, rowKey, expandable }</span>) =></span> (
|
||||
<span class="hljs-comment">// ....</span>
|
||||
)
|
||||
};
|
||||
</code></pre>
|
||||
<h2><a class="anchor" aria-hidden="true" name="expandrowexpandheadercolumnrenderer-function"></a><a href="#expandrowexpandheadercolumnrenderer-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>expandRow.expandHeaderColumnRenderer - [Function]</h2>
|
||||
<p>Provide a callback function which allow you to custom the expand indicator in the expand header column. This callback only have one argument which is an object and contain one property <code>isAnyExpands</code> to indicate if there are any expanded rows:</p>
|
||||
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> expandRow = {
|
||||
<pre><code class="hljs">
|
||||
|
||||
<span class="coffeescript"><span class="hljs-comment">## expandRow.expandHeaderColumnRenderer - [Function]</span>
|
||||
Provide a callback function which allow you to custom the expand indicator <span class="hljs-keyword">in</span> the expand header column. This callback only have one argument which <span class="hljs-keyword">is</span> an object <span class="hljs-keyword">and</span> contain one property `<span class="javascript">isAnyExpands</span>` to indicate <span class="hljs-keyword">if</span> there are any expanded rows:
|
||||
|
||||
```<span class="javascript">js
|
||||
<span class="hljs-keyword">const</span> expandRow = {
|
||||
<span class="hljs-attr">renderer</span>: <span class="hljs-function">(<span class="hljs-params">row</span>) =></span> ...,
|
||||
<span class="hljs-attr">showExpandColumn</span>: <span class="hljs-literal">true</span>,
|
||||
<span class="hljs-attr">expandHeaderColumnRenderer</span>: <span class="hljs-function">(<span class="hljs-params">{ isAnyExpands }</span>) =></span> (
|
||||
<span class="hljs-comment">// ....</span>
|
||||
)
|
||||
};
|
||||
</code></pre>
|
||||
</span></span></code></pre>
|
||||
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="row-select-props.html">← Row Selection 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>
|
||||
@@ -32,6 +32,7 @@
|
||||
<li><a href="#rowstyle-object-function">rowStyle</a></li>
|
||||
<li><a href="#rowclasses-string-function">rowClasses</a></li>
|
||||
<li><a href="#rowevents-object">rowEvents</a></li>
|
||||
<li><a href="#hiddenrows-array">hiddenRows</a></li>
|
||||
<li><a href="#defaultsorted-array">defaultSorted</a></li>
|
||||
<li><a href="#defaultSortDirection-string">defaultSortDirection</a></li>
|
||||
<li><a href="#pagination-object">pagination</a></li>
|
||||
@@ -143,6 +144,11 @@ When <code>loading</code> is <code>true</code>, <code>react-bootstrap-table2</co
|
||||
};
|
||||
<span class="xml"><span class="hljs-tag"><<span class="hljs-name">BootstrapTable</span> <span class="hljs-attr">data</span>=<span class="hljs-string">{</span> <span class="hljs-attr">data</span> } <span class="hljs-attr">columns</span>=<span class="hljs-string">{</span> <span class="hljs-attr">columns</span> } <span class="hljs-attr">rowEvents</span>=<span class="hljs-string">{</span> <span class="hljs-attr">rowEvents</span> } /></span>
|
||||
</span></code></pre>
|
||||
<h2><a class="anchor" aria-hidden="true" name="hiddenrows-array"></a><a href="#hiddenrows-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>hiddenRows - [Array]</h2>
|
||||
<p>Hide rows, this props accept an array of row keys:</p>
|
||||
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> hiddenRows = [<span class="hljs-number">1</span>, <span class="hljs-number">4</span>];
|
||||
<span class="xml"><span class="hljs-tag"><<span class="hljs-name">BootstrapTable</span> <span class="hljs-attr">data</span>=<span class="hljs-string">{</span> <span class="hljs-attr">data</span> } <span class="hljs-attr">columns</span>=<span class="hljs-string">{</span> <span class="hljs-attr">columns</span> } <span class="hljs-attr">hiddenRows</span>=<span class="hljs-string">{</span> <span class="hljs-attr">hiddenRows</span> } /></span>
|
||||
</span></code></pre>
|
||||
<h2><a class="anchor" aria-hidden="true" name="defaultsorted-array"></a><a href="#defaultsorted-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>defaultSorted - [Array]</h2>
|
||||
<p><code>defaultSorted</code> accept an object array which allow you to define the default sort columns when first render.</p>
|
||||
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> defaultSorted = [{
|
||||
|
||||
Reference in New Issue
Block a user