search not working in react mdbdatatable for link

Solutions on MaxInterview for search not working in react mdbdatatable for link by the best coders in the world

showing results for - "search not working in react mdbdatatable for link"
Nevin
10 Nov 2017
1import React from 'react';
2import { MDBDataTable } from 'mdbreact';
3
4const DatatablePage = () => {
5  const data = {
6    columns: [
7      {
8        label: 'Name',
9        field: 'name',
10        sort: 'asc',
11        width: 150
12      },
13      {
14        label: 'Position',
15        field: 'position',
16        sort: 'asc',
17        width: 270
18      },
19      {
20        label: 'Office',
21        field: 'office',
22        sort: 'asc',
23        width: 200
24      },
25      {
26        label: 'Random Word',
27        field: 'random',
28        sort: 'asc',
29        width: 50
30      }
31    ],
32    rows: [
33      {
34        name: 'Tiger Nixon',
35        position: 'System Architect',
36        office: 'Edinburgh',
37        random: <h5 searchvalue={'tourist'} >tourist <span className="badge badge-danger">narrow</span></h5>
38      },
39      {
40        name: 'Garrett Winters',
41        position: 'Accountant',
42        office: 'Tokyo',
43        random: <h5 searchvalue={'expression'} >expression <span className="badge badge-danger">popular</span></h5>
44      },
45      {
46        name: 'Ashton Cox',
47        position: 'Junior Technical Author',
48        office: 'San Francisco',
49        random: <h5 searchvalue={'rule'} >rule <span className="badge badge-danger">estimate</span></h5>
50      },
51      {
52        name: 'Cedric Kelly',
53        position: 'Senior Javascript Developer',
54        office: 'Edinburgh',
55        random: <h5 searchvalue={'announcement'} >announcement <span className="badge badge-danger">preparation</span></h5>
56      },
57      {
58        name: 'Airi Satou',
59        position: 'Accountant',
60        office: 'Tokyo',
61        random: <h5 searchvalue={'preoccupation'} >preoccupation <span className="badge badge-danger">stock</span></h5>
62      }
63    ]
64  };
65
66  return (
67    <MDBDataTable
68      striped
69      bordered
70      hover
71      data={data}
72      sortRows={['random']}
73    />
74  );
75}
76
77export default DatatablePage;