20190209 release

This commit is contained in:
AllenFang
2019-02-09 21:04:20 +08:00
parent ed9e66b62d
commit e3c10b3445
49 changed files with 233 additions and 143 deletions
+5 -5
View File
@@ -96,7 +96,7 @@
</ul>
<h3><a class="anchor" aria-hidden="true" name="textfilteronfilter-function"></a><a href="#textfilteronfilter-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>textFilter.onFilter - [Function]</h3>
<ul>
<li>Register a listener which will be called when column filter being triggered.</li>
<li>Register a listener which will be called when column filter being triggered. If you return an array value, <code>react-bootstrap-table2</code> will adopt this value as final filted result.</li>
</ul>
<p><strong>Example</strong></p>
<pre><code class="hljs css js"><span class="hljs-keyword">import</span> BootstrapTable <span class="hljs-keyword">from</span> <span class="hljs-string">'react-bootstrap-table-next'</span>;
@@ -165,7 +165,7 @@
</ul>
<h3><a class="anchor" aria-hidden="true" name="selectfilteronfilter-function"></a><a href="#selectfilteronfilter-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>selectFilter.onFilter - [Function]</h3>
<ul>
<li>Register a listener which will be called when column filter being triggered.</li>
<li>Register a listener which will be called when column filter being triggered. If you return an array value, <code>react-bootstrap-table2</code> will adopt this value as final filted result.</li>
</ul>
<p><strong>Example</strong></p>
<pre><code class="hljs css js"><span class="hljs-keyword">import</span> BootstrapTable <span class="hljs-keyword">from</span> <span class="hljs-string">'react-bootstrap-table-next'</span>;
@@ -233,7 +233,7 @@
</ul>
<h3><a class="anchor" aria-hidden="true" name="multiselectfilteronfilter-function"></a><a href="#multiselectfilteronfilter-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>multiSelectFilter.onFilter - [Function]</h3>
<ul>
<li>Register a listener which will be called when column filter being triggered.</li>
<li>Register a listener which will be called when column filter being triggered. If you return an array value, <code>react-bootstrap-table2</code> will adopt this value as final filted result.</li>
</ul>
<p><strong>Example</strong></p>
<pre><code class="hljs css js"><span class="hljs-keyword">import</span> BootstrapTable <span class="hljs-keyword">from</span> <span class="hljs-string">'react-bootstrap-table-next'</span>;
@@ -333,7 +333,7 @@
</ul>
<h3><a class="anchor" aria-hidden="true" name="numberfilteronfilter-function"></a><a href="#numberfilteronfilter-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>numberFilter.onFilter - [Function]</h3>
<ul>
<li>Register a listener which will be called when column filter being triggered.</li>
<li>Register a listener which will be called when column filter being triggered. If you return an array value, <code>react-bootstrap-table2</code> will adopt this value as final filted result.</li>
</ul>
<p><strong>Example</strong>:</p>
<pre><code class="hljs css js"><span class="hljs-keyword">import</span> BootstrapTable <span class="hljs-keyword">from</span> <span class="hljs-string">'react-bootstrap-table-next'</span>;
@@ -424,7 +424,7 @@
</ul>
<h3><a class="anchor" aria-hidden="true" name="datefilteronfilter-function"></a><a href="#datefilteronfilter-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>dateFilter.onFilter - [Function]</h3>
<ul>
<li>Register a listener which will be called when column filter being triggered.</li>
<li>Register a listener which will be called when column filter being triggered. If you return an array value, <code>react-bootstrap-table2</code> will adopt this value as final filted result.</li>
</ul>
<p><strong>Example</strong>:</p>
<pre><code class="hljs css js"><span class="hljs-keyword">import</span> BootstrapTable <span class="hljs-keyword">from</span> <span class="hljs-string">'react-bootstrap-table-next'</span>;
+36 -31
View File
@@ -12,32 +12,37 @@
</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="#remote-bool-object">remote</a></li>
<li><a href="#bootstrap4-bool">bootstrap4</a></li>
<li><a href="#nodataindication-function">noDataIndication</a></li>
<li><a href="#loading-bool">loading</a></li>
<li><a href="#overlay-function">overlay</a></li>
<li><a href="#caption-string-node">caption</a></li>
<li><a href="#striped-bool">striped</a></li>
<li><a href="#bordered-bool">bordered</a></li>
<li><a href="#hover-bool">hover</a></li>
<li><a href="#condensed-bool">condensed</a></li>
<li><a href="#id-string">id</a></li>
<li><a href="#tabindexcell-bool">tabIndexCell</a></li>
<li><a href="#classes-string">classes</a></li>
<li><a href="#wrapperClasses-string">wrapperClasses</a></li>
<li><a href="#headerClasses-string">headerClasses</a></li>
<li><a href="#celledit-object">cellEdit</a></li>
<li><a href="#selectrow-object">selectRow</a></li>
<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>
<li><a href="#filter-object">filter</a></li>
<li><a href="#ontablechange-function">onTableChange</a></li>
<li><a href="#required">Required</a></li>
<li><a href="#optional">Optional</a></li>
<li><a href="#keyfieldrequired---string">keyField(<strong>required</strong>) - [String]</a></li>
<li><a href="#datarequired---array">data(<strong>required</strong>) - [Array]</a></li>
<li><a href="#columnsrequired---object">columns(<strong>required</strong>) - [Object]</a></li>
<li><a href="#remote---bool--object">remote - [Bool | Object]</a></li>
<li><a href="#bootstrap4---bool">bootstrap4 - [Bool]</a></li>
<li><a href="#nodataindication---function">noDataIndication - [Function]</a></li>
<li><a href="#loading---bool">loading - [Bool]</a></li>
<li><a href="#overlay---function">overlay - [Function]</a></li>
<li><a href="#caption---string--node">caption - [String | Node]</a></li>
<li><a href="#striped---bool">striped - [Bool]</a></li>
<li><a href="#bordered---bool">bordered - [Bool]</a></li>
<li><a href="#hover---bool">hover - [Bool]</a></li>
<li><a href="#condensed---bool">condensed - [Bool]</a></li>
<li><a href="#id---string">id - [String]</a></li>
<li><a href="#tabindexcell---bool">tabIndexCell - [Bool]</a></li>
<li><a href="#classes---string">classes - [String]</a></li>
<li><a href="#wrapperclasses---string">wrapperClasses - [String]</a></li>
<li><a href="#headerclasses---string">headerClasses - [String]</a></li>
<li><a href="#celledit---object">cellEdit - [Object]</a></li>
<li><a href="#selectrow---object">selectRow - [Object]</a></li>
<li><a href="#rowstyle---object--function">rowStyle - [Object | Function]</a></li>
<li><a href="#rowclasses---string--function">rowClasses - [String | Function]</a></li>
<li><a href="#rowevents---object">rowEvents - [Object]</a></li>
<li><a href="#hiddenrows---array">hiddenRows - [Array]</a></li>
<li><a href="#defaultsorted---array">defaultSorted - [Array]</a></li>
<li><a href="#defaultsortdirection---string">defaultSortDirection - [String]</a></li>
<li><a href="#pagination---object">pagination - [Object]</a></li>
<li><a href="#filter---object">filter - [Object]</a></li>
<li><a href="#ontablechange---function">onTableChange - [Function]</a></li>
</ul>
<hr>
<h2><a class="anchor" aria-hidden="true" name="keyfield-required-string"></a><a href="#keyfield-required-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>keyField(<strong>required</strong>) - [String]</h2>
@@ -52,12 +57,12 @@ This is a chance that you can connect to your remote server or database to manip
For flexibility reason, you can control what functionality should be handled on remote via a object return:</p>
<pre><code class="hljs css js">remote={ {
<span class="hljs-attr">filter</span>: <span class="hljs-literal">true</span>,
<span class="hljs-attr">pagination</span>: <span class="hljs-literal">true</span>,
<span class="hljs-attr">sort</span>: <span class="hljs-literal">true</span>,
<span class="hljs-attr">cellEdit</span>: <span class="hljs-literal">true</span>
<span class="hljs-attr">pagination</span>: <span class="hljs-literal">false</span>,
<span class="hljs-attr">sort</span>: <span class="hljs-literal">false</span>,
<span class="hljs-attr">cellEdit</span>: <span class="hljs-literal">false</span>
} }
</code></pre>
<p>In above case, only column filter will be handled on remote.</p>
<p>In above case, only column filter will be handled on remote because we enable it by giving <code>true</code>.</p>
<blockquote>
<p>Note: when remote is enable, you are suppose to give <a href="#ontablechange-function"><code>onTableChange</code></a> prop on <code>BootstrapTable</code>
It's the only way to communicate to your remote server and update table states.</p>
@@ -240,7 +245,7 @@ When <code>loading</code> is <code>true</code>, <code>react-bootstrap-table2</co
<li><code>sort</code></li>
<li><code>cellEdit</code></li>
</ul>
<p>Following is a shape of <code>newState</code></p>
<p>Following is a all available properties in <code>newState</code> object:</p>
<pre><code class="hljs css js">{
page, <span class="hljs-comment">// newest page</span>
sizePerPage, <span class="hljs-comment">// newest sizePerPage</span>