mirror of
https://github.com/gosticks/react-bootstrap-table2.git
synced 2026-08-11 11:40:22 +00:00
fix #40
* add missing dependenies * tuning webpack loader for scss * implement noDataIndication * add story for noDataIndication prop * patch yarn.lock
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import React from 'react';
|
||||
|
||||
import { BootstrapTable } from 'react-bootstrap-table2';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
}, {
|
||||
dataField: 'name',
|
||||
text: 'Product Name'
|
||||
}, {
|
||||
dataField: 'price',
|
||||
text: 'Product Price'
|
||||
}];
|
||||
|
||||
export default () => (
|
||||
<div>
|
||||
<BootstrapTable keyField="id" data={ [] } columns={ columns } noDataIndication="Table is Empty" />
|
||||
<pre className="prettyprint lang-js"><code className="language-javascript">{`
|
||||
<BootstrapTable keyField='id' data={ [] } columns={ columns } noDataIndication="Table is Empty" />
|
||||
|
||||
// Following is more customizable example
|
||||
|
||||
function indication() {
|
||||
// return something here
|
||||
}
|
||||
|
||||
<BootstrapTable keyField='id' data={ [] } columns={ columns } noDataIndication={ indication } />
|
||||
`}
|
||||
</code></pre>
|
||||
</div>
|
||||
);
|
||||
Reference in New Issue
Block a user