mirror of
https://github.com/gosticks/react-bootstrap-table2.git
synced 2025-10-16 11:55:39 +00:00
* add missing dependenies * tuning webpack loader for scss * implement noDataIndication * add story for noDataIndication prop * patch yarn.lock
33 lines
797 B
JavaScript
33 lines
797 B
JavaScript
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>
|
|
);
|