Skip to content

Commit 85f1eba

Browse files
committed
tweak stories
1 parent 045ca4a commit 85f1eba

File tree

62 files changed

+252
-33
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+252
-33
lines changed

packages/react-bootstrap-table2-example/examples/basic/borderless-table.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ const columns = [{
1818
}];
1919

2020
const sourceCode = `\
21+
import BootstrapTable from 'react-bootstrap-table-next';
22+
// omit...
23+
2124
<BootstrapTable
2225
keyField="id"
2326
data={ products }

packages/react-bootstrap-table2-example/examples/basic/caption-table.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ const columns = [{
1818
}];
1919

2020
const sourceCode = `\
21+
import BootstrapTable from 'react-bootstrap-table-next';
22+
2123
const columns = [{
2224
dataField: 'id',
2325
text: 'Product ID'

packages/react-bootstrap-table2-example/examples/basic/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ const columns = [{
1818
}];
1919

2020
const sourceCode = `\
21+
import BootstrapTable from 'react-bootstrap-table-next';
22+
2123
const columns = [{
2224
dataField: 'id',
2325
text: 'Product ID'

packages/react-bootstrap-table2-example/examples/basic/no-data-table.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ const columns = [{
1515
}];
1616

1717
const sourceCode = `\
18+
import BootstrapTable from 'react-bootstrap-table-next';
19+
// omit...
20+
1821
<BootstrapTable keyField='id' data={ [] } columns={ columns } noDataIndication="Table is Empty" />
1922
20-
// Following is more customizable example
23+
// Following is a more flexible example
2124
2225
function indication() {
2326
// return something here

packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ const columns = [{
1818
}];
1919

2020
const sourceCode = `\
21+
import BootstrapTable from 'react-bootstrap-table-next';
22+
// omit...
23+
2124
<BootstrapTable
2225
keyField="id"
2326
data={ products }

packages/react-bootstrap-table2-example/examples/cell-edit/blur-to-save-table.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ const columns = [{
1919
}];
2020

2121
const sourceCode = `\
22+
import BootstrapTable from 'react-bootstrap-table-next';
2223
import cellEditFactory from 'react-bootstrap-table2-editor';
23-
// ...
24+
2425
const columns = [{
2526
dataField: 'id',
2627
text: 'Product ID'

packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-class-table.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ const columns = [{
2323
}];
2424

2525
const sourceCode = `\
26+
import BootstrapTable from 'react-bootstrap-table-next';
2627
import cellEditFactory from 'react-bootstrap-table2-editor';
27-
// ...
28+
2829
const columns = [{
2930
dataField: 'id',
3031
text: 'Product ID'

packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-hooks-table.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ const columns = [{
2121
}];
2222

2323
const sourceCode = `\
24+
import BootstrapTable from 'react-bootstrap-table-next';
2425
import cellEditFactory from 'react-bootstrap-table2-editor';
25-
// ...
26+
2627
const columns = [{
2728
dataField: 'id',
2829
text: 'Product ID'

packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-style-table.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ const columns = [{
2727
}];
2828

2929
const sourceCode = `\
30+
import BootstrapTable from 'react-bootstrap-table-next';
3031
import cellEditFactory from 'react-bootstrap-table2-editor';
31-
// ...
32+
3233
const columns = [{
3334
dataField: 'id',
3435
text: 'Product ID'

packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-validator-table.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ const columns = [{
3434
}];
3535

3636
const sourceCode = `\
37+
import BootstrapTable from 'react-bootstrap-table-next';
3738
import cellEditFactory from 'react-bootstrap-table2-editor';
38-
// ...
39+
3940
const columns = [{
4041
dataField: 'id',
4142
text: 'Product ID'

packages/react-bootstrap-table2-example/examples/cell-edit/cell-level-editable-table.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ const columns = [{
2121
}];
2222

2323
const sourceCode = `\
24+
import BootstrapTable from 'react-bootstrap-table-next';
2425
import cellEditFactory from 'react-bootstrap-table2-editor';
25-
// ...
26+
2627
const columns = [{
2728
dataField: 'id',
2829
text: 'Product ID'
@@ -45,6 +46,7 @@ const columns = [{
4546

4647
export default () => (
4748
<div>
49+
<h3>Only Product Price is bigger than 2101 is editable</h3>
4850
<BootstrapTable
4951
keyField="id"
5052
data={ products }

packages/react-bootstrap-table2-example/examples/cell-edit/click-to-edit-table.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ const columns = [{
2020
}];
2121

2222
const sourceCode = `\
23+
import BootstrapTable from 'react-bootstrap-table-next';
2324
import cellEditFactory from 'react-bootstrap-table2-editor';
24-
// ...
25+
2526
const columns = [{
2627
dataField: 'id',
2728
text: 'Product ID'
@@ -43,6 +44,7 @@ const columns = [{
4344

4445
export default () => (
4546
<div>
47+
<h3>Click to edit cell</h3>
4648
<BootstrapTable
4749
keyField="id"
4850
data={ products }

packages/react-bootstrap-table2-example/examples/cell-edit/column-level-editable-table.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ const columns = [{
2020
}];
2121

2222
const sourceCode = `\
23+
import BootstrapTable from 'react-bootstrap-table-next';
2324
import cellEditFactory from 'react-bootstrap-table2-editor';
24-
// ...
25+
2526
const columns = [{
2627
dataField: 'id',
2728
text: 'Product ID'
@@ -48,6 +49,7 @@ const columns = [{
4849

4950
export default () => (
5051
<div>
52+
<h3>Product Name is non editable</h3>
5153
<BootstrapTable
5254
keyField="id"
5355
data={ products }

packages/react-bootstrap-table2-example/examples/cell-edit/dbclick-to-edit-table.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ const columns = [{
1919
}];
2020

2121
const sourceCode = `\
22+
import BootstrapTable from 'react-bootstrap-table-next';
2223
import cellEditFactory from 'react-bootstrap-table2-editor';
23-
// ...
24+
2425
const columns = [{
2526
dataField: 'id',
2627
text: 'Product ID'
@@ -42,6 +43,7 @@ const columns = [{
4243

4344
export default () => (
4445
<div>
46+
<h3>Double click to edit cell</h3>
4547
<BootstrapTable
4648
keyField="id"
4749
data={ products }

packages/react-bootstrap-table2-example/examples/cell-edit/row-level-editable-table.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ const columns = [{
1919
}];
2020

2121
const sourceCode = `\
22+
import BootstrapTable from 'react-bootstrap-table-next';
2223
import cellEditFactory from 'react-bootstrap-table2-editor';
23-
// ...
24+
2425
const columns = [{
2526
dataField: 'id',
2627
text: 'Product ID'
@@ -45,6 +46,7 @@ const columns = [{
4546
`;
4647
export default () => (
4748
<div>
49+
<h3>Product ID: 0, 3 is non editable</h3>
4850
<BootstrapTable
4951
keyField="id"
5052
data={ products }

packages/react-bootstrap-table2-example/examples/column-filter/custom-filter-value.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const columns = [{
3232
}];
3333

3434
const sourceCode = `\
35+
import BootstrapTable from 'react-bootstrap-table-next';
3536
import filterFactory, { textFilter } from 'react-bootstrap-table2-filter';
3637
3738
const owners = ['Allen', 'Bob', 'Cat'];

packages/react-bootstrap-table2-example/examples/column-filter/custom-text-filter.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const columns = [{
2929
}];
3030

3131
const sourceCode = `\
32+
import BootstrapTable from 'react-bootstrap-table-next';
3233
import filterFactory, { textFilter } from 'react-bootstrap-table2-filter';
3334
3435
const columns = [{

packages/react-bootstrap-table2-example/examples/column-filter/text-filter-default-value.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const columns = [{
2222
}];
2323

2424
const sourceCode = `\
25+
import BootstrapTable from 'react-bootstrap-table-next';
2526
import filterFactory, { textFilter } from 'react-bootstrap-table2-filter';
2627
2728
const columns = [{

packages/react-bootstrap-table2-example/examples/column-filter/text-filter-eq-comparator.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const columns = [{
2222
}];
2323

2424
const sourceCode = `\
25+
import BootstrapTable from 'react-bootstrap-table-next';
2526
import filterFactory, { textFilter, Comparator } from 'react-bootstrap-table2-filter';
2627
2728
const columns = [{

packages/react-bootstrap-table2-example/examples/column-filter/text-filter.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const columns = [{
2020
}];
2121

2222
const sourceCode = `\
23+
import BootstrapTable from 'react-bootstrap-table-next';
2324
import filterFactory, { textFilter } from 'react-bootstrap-table2-filter';
2425
2526
const columns = [{

packages/react-bootstrap-table2-example/examples/columns/column-align-table.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ const columns = [{
2424
}];
2525

2626
const sourceCode = `\
27+
import BootstrapTable from 'react-bootstrap-table-next';
28+
2729
const columns = [{
2830
dataField: 'id',
2931
text: 'Product ID',

packages/react-bootstrap-table2-example/examples/columns/column-attrs-table.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ const columns = [{
2121
}];
2222

2323
const sourceCode = `\
24+
import BootstrapTable from 'react-bootstrap-table-next';
25+
2426
const columns = [{
2527
dataField: 'id',
2628
text: 'Product ID',
@@ -39,6 +41,7 @@ const columns = [{
3941

4042
export default () => (
4143
<div>
44+
<h3>Try to hover on Product Name header column</h3>
4245
<BootstrapTable keyField="id" data={ products } columns={ columns } />
4346
<Code>{ sourceCode }</Code>
4447
</div>

packages/react-bootstrap-table2-example/examples/columns/column-class-table.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ const columns = [{
2424
}];
2525

2626
const sourceCode = `\
27+
import BootstrapTable from 'react-bootstrap-table-next';
28+
2729
const columns = [{
2830
dataField: 'id',
2931
text: 'Product ID',

packages/react-bootstrap-table2-example/examples/columns/column-event-table.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ const columns = [{
2323
}];
2424

2525
const sourceCode = `\
26+
import BootstrapTable from 'react-bootstrap-table-next';
27+
2628
const columns = [{
2729
dataField: 'id',
2830
text: 'Product ID',

packages/react-bootstrap-table2-example/examples/columns/column-format-table.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ const columns = [{
3131
}];
3232

3333
const sourceCode = `\
34+
import BootstrapTable from 'react-bootstrap-table-next';
35+
3436
function priceFormatter(cell, row) {
3537
if (row.onSale) {
3638
return (

packages/react-bootstrap-table2-example/examples/columns/column-format-with-extra-data-table.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ const columns = [{
3434
}];
3535

3636
const sourceCode = `\
37+
import BootstrapTable from 'react-bootstrap-table-next';
38+
3739
function rankFormatter(cell, row, rowIndex, formatExtraData) {
3840
return (
3941
<i className={ formatExtraData[cell] } />

packages/react-bootstrap-table2-example/examples/columns/column-hidden-table.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ const columns = [{
2020
}];
2121

2222
const sourceCode = `\
23+
import BootstrapTable from 'react-bootstrap-table-next';
24+
2325
const columns = [{
2426
dataField: 'id',
2527
text: 'Product ID',

packages/react-bootstrap-table2-example/examples/columns/column-style-table.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ const columns = [{
3333
}];
3434

3535
const sourceCode = `\
36+
import BootstrapTable from 'react-bootstrap-table-next';
37+
3638
const columns = [{
3739
dataField: 'id',
3840
text: 'Product ID',

packages/react-bootstrap-table2-example/examples/columns/column-title-table.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const columns = [{
3939

4040
export default () => (
4141
<div>
42+
<h3>Try to hover on any Product Name cells</h3>
4243
<BootstrapTable keyField="id" data={ products } columns={ columns } />
4344
<Code>{ sourceCode }</Code>
4445
</div>

packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ const columns = [{
3232
}];
3333

3434
const sourceCode = `\
35+
import BootstrapTable from 'react-bootstrap-table-next';
36+
3537
const columns = [{
3638
dataField: 'id',
3739
text: 'User ID'

packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ const columns = [{
2121
}];
2222

2323
const sourceCode = `\
24+
import BootstrapTable from 'react-bootstrap-table-next';
25+
2426
const columns = [{
2527
dataField: 'id',
2628
text: 'Product ID',

packages/react-bootstrap-table2-example/examples/header-columns/column-attrs-table.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ const columns = [{
2121
}];
2222

2323
const sourceCode = `\
24+
import BootstrapTable from 'react-bootstrap-table-next';
25+
2426
const columns = [{
2527
dataField: 'id',
2628
text: 'Product ID',

packages/react-bootstrap-table2-example/examples/header-columns/column-class-table.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ const columns = [{
2424
}];
2525

2626
const sourceCode = `\
27+
import BootstrapTable from 'react-bootstrap-table-next';
28+
2729
const columns = [{
2830
dataField: 'id',
2931
text: 'Product ID'

packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ const columns = [{
2323
}];
2424

2525
const sourceCode = `\
26+
import BootstrapTable from 'react-bootstrap-table-next';
27+
2628
const columns = [{
2729
dataField: 'id',
2830
text: 'Product ID',

packages/react-bootstrap-table2-example/examples/header-columns/column-format-filter-sort-table.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const defaultSorted = [{
4141
}];
4242

4343
const sourceCode = `\
44+
import BootstrapTable from 'react-bootstrap-table-next';
4445
import filterFactory, { textFilter } from 'react-bootstrap-table2-filter';
4546
// ...
4647
function priceFormatter(column, colIndex, { sortElement, filterElement }) {

packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ const columns = [{
2626
}];
2727

2828
const sourceCode = `\
29+
import BootstrapTable from 'react-bootstrap-table-next';
30+
2931
function priceFormatter(column, colIndex) {
3032
return (
3133
<h5><strong>$$ { column.text } $$</strong></h5>

0 commit comments

Comments
 (0)