Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f2b6dd5

Browse files
fix custom filter value example broken
1 parent 30d5b41 commit f2b6dd5

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import React from 'react';
33
import BootstrapTable from 'react-bootstrap-table-next';
44
import filterFactory, { textFilter } from 'react-bootstrap-table2-filter';
55
import Code from 'components/common/code-block';
6-
import { jobsGenerator } from 'utils/common';
6+
import { jobsGenerator1 } from 'utils/common';
77

8-
const jobs = jobsGenerator(5);
8+
const jobs = jobsGenerator1(5);
99

1010
const owners = ['Allen', 'Bob', 'Cat'];
1111
const types = ['Cloud Service', 'Message Service', 'Add Service', 'Edit Service', 'Money'];

‎packages/react-bootstrap-table2-example/src/utils/common.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ export const jobsGenerator = (quantity = 5) =>
4141
type: jobType[Math.floor((Math.random() * 4) + 1)]
4242
}));
4343

44+
export const jobsGenerator1 = (quantity = 5) =>
45+
Array.from({ length: quantity }, (value, index) => ({
46+
id: index,
47+
name: `Job name ${index}`,
48+
owner: Math.floor((Math.random() * 2) + 1),
49+
type: Math.floor((Math.random() * 4) + 1)
50+
}));
51+
4452
export const todosGenerator = (quantity = 5) =>
4553
Array.from({ length: quantity }, (value, index) => ({
4654
id: index,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /