mirror of
https://github.com/gosticks/react-bootstrap-table2.git
synced 2025-10-16 11:55:39 +00:00
fix custom filter value example broken
This commit is contained in:
parent
216bc10142
commit
4f6809de84
@ -3,9 +3,9 @@ import React from 'react';
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import filterFactory, { textFilter } from 'react-bootstrap-table2-filter';
|
||||
import Code from 'components/common/code-block';
|
||||
import { jobsGenerator } from 'utils/common';
|
||||
import { jobsGenerator1 } from 'utils/common';
|
||||
|
||||
const jobs = jobsGenerator(5);
|
||||
const jobs = jobsGenerator1(5);
|
||||
|
||||
const owners = ['Allen', 'Bob', 'Cat'];
|
||||
const types = ['Cloud Service', 'Message Service', 'Add Service', 'Edit Service', 'Money'];
|
||||
|
||||
@ -41,6 +41,14 @@ export const jobsGenerator = (quantity = 5) =>
|
||||
type: jobType[Math.floor((Math.random() * 4) + 1)]
|
||||
}));
|
||||
|
||||
export const jobsGenerator1 = (quantity = 5) =>
|
||||
Array.from({ length: quantity }, (value, index) => ({
|
||||
id: index,
|
||||
name: `Job name ${index}`,
|
||||
owner: Math.floor((Math.random() * 2) + 1),
|
||||
type: Math.floor((Math.random() * 4) + 1)
|
||||
}));
|
||||
|
||||
export const todosGenerator = (quantity = 5) =>
|
||||
Array.from({ length: quantity }, (value, index) => ({
|
||||
id: index,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user