import React, { Component } from 'react';
import FlybaseDataGrid from 'react-flybase-datagrid';
import faker from 'faker';
import './agr.css';

function getHeaders(){

  var columns = [
   {id:'id', name:'ID'},
   {id:'name', name:'Name'},
   {id:'address', name:'Street Address'},
   {id:'state', name:'State'},
   {id:'zip', name:'Zip Code'}
  ];

  return columns;

}

function generateList(){
  var items = [];

  for (var i=1; i<=5000; i++){
    items.push({ id: i, name: faker.name.findName(), address: faker.address.streetAddress(), state: faker.address.stateAbbr(), zip: faker.address.zipCode()});
  }

  return items;
}

const data = generateList();

class DiseaseTable extends Component {
  render() {
    return (

       <FlybaseDataGrid columns={getHeaders()} data={data} showDownloadButton={false} showFilter={false} />

    );
  }
}

export default DiseaseTable;

@@ -93,35 +93,8 @@
 d';%0A
-import faker from 'faker';%0A
 impo
@@ -160,18 +160,20 @@
    %7Bid:'
-id
+name
 ', name:
@@ -177,10 +177,20 @@
 me:'
-I
 D
+isease Name
 '%7D,%0A
@@ -189,36 +189,36 @@
 Name'%7D,%0A   %7Bid:'
-name
+assc
 ', name:'Name'%7D,
@@ -210,20 +210,27 @@
 , name:'
-Name
+Association
 '%7D,%0A   %7B
@@ -233,23 +233,18 @@
    %7Bid:'
-address
+ec
 ', name:
@@ -248,22 +248,21 @@
 me:'
-Street Address
+Evidence Code
 '%7D,%0A
@@ -269,21 +269,18 @@
    %7Bid:'
+a
 s
-tate
 ', name:
@@ -284,12 +284,25 @@
 me:'
-Stat
+Association Sourc
 e'%7D,
@@ -310,19 +310,19 @@
    %7Bid:'
-zip
+ref
 ', name:
@@ -326,16 +326,18 @@
 me:'
-Zip Code
+References
 '%7D%0A 
@@ -367,293 +367,1305 @@
 %0A%7D%0A%0A
-function generateList()%7B%0A  var i
+const data = %5B%0A%7B name: 'Bannayan-Riley-Ruvalcaba syndrome', assc: 'is model of', ec: 'TAS', as: 'MGI', ref: 'PMID:12345, PMID:12345'%7D,%0A%7B name: 'brain glioma', assc: 'causes or contribu
 te
-m
 s 
-= %5B%5D;%0A%0A  for (var i=1; i%3C=5000; i++)%7B%0A    items.push(%7B id: i, name: faker.name.findName(), address: faker.address.streetAddress(), stat
+to condition', ec: 'TAS', as: 'FB', ref: 'PMID:12345'%7D,%0A%7B name: 'Cowden disease', assc: 'is model of', ec: 'TAS', as: 'MGI', ref: 'PMID:12345'%7D,%0A%7B name: 'endometrial cancer', assc: 'causes or contributes to condition', ec: 'ISS', as: 'RGD', ref: 'PMID:12345'%7D,%0A%7B name: 'prostate cancer', assc: 'is model of', ec: 'IC', as: 'ZFIN', ref: 'PMID:12345'%7D,%0A%7B name: 'prostate cancer', assc: 'causes or contributes to condition', ec: 'ISS', as: 'SGD', ref: 'PMID:12345'%7D,%0A%7B name: 'acute lymphocytic leukemia', assc: 'is model of', ec: 'TAS', as: 'MGI', ref: 'PMID:12345'%7D,%0A%7B nam
 e: 
+'
 fa
-ker.address.stateAbbr(), zip
+tty liver disease', assc: 'causes or contributes to condition', ec: 'IEP', as: 'RGD', ref: 'PMID:12345'%7D,%0A%7B name
 : 
+'
 fa
-ker.address.zipCode()%7D);%0A  %7D%0A%0A  return items;%0A%7D%0A%0Aconst data = generateList()
+tty liver disease', assc: 'is model of', ec: 'TAS', as: 'MGI', ref: 'PMID:12345'%7D,%0A%7B name: 'hepatocellular carcinoma', assc: 'causes or contributes to condition', ec: 'ISS', as: 'WB', ref: 'PMID:12345'%7D,%0A%7B name: 'persistent fetal circulation syndrome', assc: 'is model of', ec: 'TAS', as: 'MGI', ref: 'PMID:12345'%7D,%0A%7B name: 'urinary bladder cancer', assc: 'is marker for', ec: 'ISS', as: 'RGD', ref: 'PMID:12345'%7D,%0A%5D
 ;%0A%0Ac

add hardcoded data fixes #16