|
1 | 1 | import React from "react"; |
2 | 2 | import ReactDOM from "react-dom"; |
3 | 3 | import { Datagrid } from "@activewidgets/react"; |
4 | | -import * as data from "@activewidgets/examples/northwind"; |
| 4 | +import { northwind } from "@activewidgets/examples/data"; |
5 | 5 |
|
6 | 6 | const columns = [ |
7 | | - {header: 'Code', field: 'CustomerID', width: 80, style: 'background:#def', fixed: true}, |
8 | | - {header: 'Company Name', field: 'CompanyName', width: 160}, |
9 | | - {header: 'Contact', field: 'ContactName', width: 120}, |
10 | | - {header: 'Title', field: 'ContactTitle', width: 120}, |
11 | | - {header: 'Address', field: 'Address', width: 120}, |
12 | | - {header: 'City', field: 'City'}, |
13 | | - {header: 'Zip', field: 'PostalCode', align: 'right'}, |
14 | | - {header: 'Phone', field: 'Phone'}, |
15 | | - {header: 'Fax', field: 'Fax'}, |
16 | | - {header: 'Country', field: 'Country'} |
| 7 | + {header: 'Code', field: 'customerID', width: 80, style: 'background:#def', fixed: true}, |
| 8 | + {header: 'Company Name', field: 'companyName', width: 160}, |
| 9 | + {header: 'Contact', field: 'contactName', width: 120}, |
| 10 | + {header: 'Title', field: 'contactTitle', width: 120}, |
| 11 | + {header: 'Address', field: 'address', width: 120}, |
| 12 | + {header: 'City', field: 'city'}, |
| 13 | + {header: 'Zip', field: 'postalCode', align: 'right'}, |
| 14 | + {header: 'Phone', field: 'phone'}, |
| 15 | + {header: 'Fax', field: 'fax'}, |
| 16 | + {header: 'Country', field: 'country'} |
17 | 17 | ]; |
18 | 18 |
|
19 | 19 | const App = () => ( |
20 | | - <Datagrid columns={columns} rows={data.customers} /> |
| 20 | + <Datagrid columns={columns} rows={northwind.customers} /> |
21 | 21 | ); |
22 | 22 |
|
23 | 23 | ReactDOM.render(<App />, document.getElementById("app")); |
0 commit comments