Skip to content
Permalink
Browse files

Unzip old react-table examples in archives

  • Loading branch information...
tannerlinsley committed Feb 11, 2019
1 parent a0495f6 commit 8b07b2c84e0ee29e0ecaa4fe23e96e864ab806a9
Showing with 47,748 additions and 0 deletions.
  1. +21 −0 archives/v6-examples/react-table-100k-rows-aggregation/.gitignore
  2. +1,863 −0 archives/v6-examples/react-table-100k-rows-aggregation/README.md
  3. +23 −0 archives/v6-examples/react-table-100k-rows-aggregation/package.json
  4. BIN archives/v6-examples/react-table-100k-rows-aggregation/public/favicon.ico
  5. +38 −0 archives/v6-examples/react-table-100k-rows-aggregation/public/index.html
  6. +15 −0 archives/v6-examples/react-table-100k-rows-aggregation/public/manifest.json
  7. +52 −0 archives/v6-examples/react-table-100k-rows-aggregation/src/Utils.js
  8. +52 −0 archives/v6-examples/react-table-100k-rows-aggregation/src/createServiceWorker.js
  9. +5 −0 archives/v6-examples/react-table-100k-rows-aggregation/src/index.css
  10. +85 −0 archives/v6-examples/react-table-100k-rows-aggregation/src/index.js
  11. +14 −0 archives/v6-examples/react-table-100k-rows-aggregation/src/package.json
  12. +5 −0 archives/v6-examples/react-table-100k-rows-aggregation/src/sandbox.config.json
  13. +21 −0 archives/v6-examples/react-table-cell-renderers/.gitignore
  14. +1,863 −0 archives/v6-examples/react-table-cell-renderers/README.md
  15. +28 −0 archives/v6-examples/react-table-cell-renderers/package.json
  16. BIN archives/v6-examples/react-table-cell-renderers/public/favicon.ico
  17. +38 −0 archives/v6-examples/react-table-cell-renderers/public/index.html
  18. +15 −0 archives/v6-examples/react-table-cell-renderers/public/manifest.json
  19. +52 −0 archives/v6-examples/react-table-cell-renderers/src/Utils.js
  20. +52 −0 archives/v6-examples/react-table-cell-renderers/src/createServiceWorker.js
  21. +5 −0 archives/v6-examples/react-table-cell-renderers/src/index.css
  22. +91 −0 archives/v6-examples/react-table-cell-renderers/src/index.js
  23. +19 −0 archives/v6-examples/react-table-cell-renderers/src/package.json
  24. +21 −0 archives/v6-examples/react-table-controlled-table/.gitignore
  25. +1,863 −0 archives/v6-examples/react-table-controlled-table/README.md
  26. +22 −0 archives/v6-examples/react-table-controlled-table/package.json
  27. BIN archives/v6-examples/react-table-controlled-table/public/favicon.ico
  28. +38 −0 archives/v6-examples/react-table-controlled-table/public/index.html
  29. +15 −0 archives/v6-examples/react-table-controlled-table/public/manifest.json
  30. +52 −0 archives/v6-examples/react-table-controlled-table/src/Utils.js
  31. +52 −0 archives/v6-examples/react-table-controlled-table/src/createServiceWorker.js
  32. +5 −0 archives/v6-examples/react-table-controlled-table/src/index.css
  33. +97 −0 archives/v6-examples/react-table-controlled-table/src/index.js
  34. +13 −0 archives/v6-examples/react-table-controlled-table/src/package.json
  35. +21 −0 archives/v6-examples/react-table-custom-column-widths/.gitignore
  36. +1,863 −0 archives/v6-examples/react-table-custom-column-widths/README.md
  37. +22 −0 archives/v6-examples/react-table-custom-column-widths/package.json
  38. BIN archives/v6-examples/react-table-custom-column-widths/public/favicon.ico
  39. +38 −0 archives/v6-examples/react-table-custom-column-widths/public/index.html
  40. +15 −0 archives/v6-examples/react-table-custom-column-widths/public/manifest.json
  41. +52 −0 archives/v6-examples/react-table-custom-column-widths/src/Utils.js
  42. +52 −0 archives/v6-examples/react-table-custom-column-widths/src/createServiceWorker.js
  43. +5 −0 archives/v6-examples/react-table-custom-column-widths/src/index.css
  44. +61 −0 archives/v6-examples/react-table-custom-column-widths/src/index.js
  45. +13 −0 archives/v6-examples/react-table-custom-column-widths/src/package.json
  46. +21 −0 archives/v6-examples/react-table-custom-component-props/.gitignore
  47. +1,863 −0 archives/v6-examples/react-table-custom-component-props/README.md
  48. +22 −0 archives/v6-examples/react-table-custom-component-props/package.json
  49. BIN archives/v6-examples/react-table-custom-component-props/public/favicon.ico
  50. +38 −0 archives/v6-examples/react-table-custom-component-props/public/index.html
  51. +15 −0 archives/v6-examples/react-table-custom-component-props/public/manifest.json
  52. +52 −0 archives/v6-examples/react-table-custom-component-props/src/Utils.js
  53. +52 −0 archives/v6-examples/react-table-custom-component-props/src/createServiceWorker.js
  54. +5 −0 archives/v6-examples/react-table-custom-component-props/src/index.css
  55. +87 −0 archives/v6-examples/react-table-custom-component-props/src/index.js
  56. +13 −0 archives/v6-examples/react-table-custom-component-props/src/package.json
  57. +21 −0 archives/v6-examples/react-table-custom-expander-position/.gitignore
  58. +1,863 −0 archives/v6-examples/react-table-custom-expander-position/README.md
  59. +22 −0 archives/v6-examples/react-table-custom-expander-position/package.json
  60. BIN archives/v6-examples/react-table-custom-expander-position/public/favicon.ico
  61. +38 −0 archives/v6-examples/react-table-custom-expander-position/public/index.html
  62. +15 −0 archives/v6-examples/react-table-custom-expander-position/public/manifest.json
  63. +52 −0 archives/v6-examples/react-table-custom-expander-position/src/Utils.js
  64. +52 −0 archives/v6-examples/react-table-custom-expander-position/src/createServiceWorker.js
  65. +5 −0 archives/v6-examples/react-table-custom-expander-position/src/index.css
  66. +87 −0 archives/v6-examples/react-table-custom-expander-position/src/index.js
  67. +13 −0 archives/v6-examples/react-table-custom-expander-position/src/package.json
  68. +21 −0 archives/v6-examples/react-table-custom-filtering/.gitignore
  69. +1,863 −0 archives/v6-examples/react-table-custom-filtering/README.md
  70. +23 −0 archives/v6-examples/react-table-custom-filtering/package.json
  71. BIN archives/v6-examples/react-table-custom-filtering/public/favicon.ico
  72. +38 −0 archives/v6-examples/react-table-custom-filtering/public/index.html
  73. +15 −0 archives/v6-examples/react-table-custom-filtering/public/manifest.json
  74. +52 −0 archives/v6-examples/react-table-custom-filtering/src/Utils.js
  75. +52 −0 archives/v6-examples/react-table-custom-filtering/src/createServiceWorker.js
  76. +5 −0 archives/v6-examples/react-table-custom-filtering/src/index.css
  77. +93 −0 archives/v6-examples/react-table-custom-filtering/src/index.js
  78. +14 −0 archives/v6-examples/react-table-custom-filtering/src/package.json
  79. +21 −0 archives/v6-examples/react-table-custom-no-data-text/.gitignore
  80. +1,863 −0 archives/v6-examples/react-table-custom-no-data-text/README.md
  81. +22 −0 archives/v6-examples/react-table-custom-no-data-text/package.json
  82. BIN archives/v6-examples/react-table-custom-no-data-text/public/favicon.ico
  83. +38 −0 archives/v6-examples/react-table-custom-no-data-text/public/index.html
  84. +15 −0 archives/v6-examples/react-table-custom-no-data-text/public/manifest.json
  85. +52 −0 archives/v6-examples/react-table-custom-no-data-text/src/Utils.js
  86. +52 −0 archives/v6-examples/react-table-custom-no-data-text/src/createServiceWorker.js
  87. +5 −0 archives/v6-examples/react-table-custom-no-data-text/src/index.css
  88. +65 −0 archives/v6-examples/react-table-custom-no-data-text/src/index.js
  89. +13 −0 archives/v6-examples/react-table-custom-no-data-text/src/package.json
  90. +21 −0 archives/v6-examples/react-table-custom-sorting/.gitignore
  91. +1,863 −0 archives/v6-examples/react-table-custom-sorting/README.md
  92. +22 −0 archives/v6-examples/react-table-custom-sorting/package.json
  93. BIN archives/v6-examples/react-table-custom-sorting/public/favicon.ico
  94. +38 −0 archives/v6-examples/react-table-custom-sorting/public/index.html
  95. +15 −0 archives/v6-examples/react-table-custom-sorting/public/manifest.json
  96. +52 −0 archives/v6-examples/react-table-custom-sorting/src/Utils.js
  97. +52 −0 archives/v6-examples/react-table-custom-sorting/src/createServiceWorker.js
  98. +5 −0 archives/v6-examples/react-table-custom-sorting/src/index.css
  99. +72 −0 archives/v6-examples/react-table-custom-sorting/src/index.js
  100. +13 −0 archives/v6-examples/react-table-custom-sorting/src/package.json
  101. +21 −0 archives/v6-examples/react-table-default-sorting/.gitignore
  102. +1,863 −0 archives/v6-examples/react-table-default-sorting/README.md
  103. +22 −0 archives/v6-examples/react-table-default-sorting/package.json
  104. BIN archives/v6-examples/react-table-default-sorting/public/favicon.ico
  105. +38 −0 archives/v6-examples/react-table-default-sorting/public/index.html
  106. +15 −0 archives/v6-examples/react-table-default-sorting/public/manifest.json
  107. +52 −0 archives/v6-examples/react-table-default-sorting/src/Utils.js
  108. +52 −0 archives/v6-examples/react-table-default-sorting/src/createServiceWorker.js
  109. +5 −0 archives/v6-examples/react-table-default-sorting/src/index.css
  110. +63 −0 archives/v6-examples/react-table-default-sorting/src/index.js
  111. +13 −0 archives/v6-examples/react-table-default-sorting/src/package.json
  112. +21 −0 archives/v6-examples/react-table-editable-content/.gitignore
  113. +1,863 −0 archives/v6-examples/react-table-editable-content/README.md
  114. +22 −0 archives/v6-examples/react-table-editable-content/package.json
  115. BIN archives/v6-examples/react-table-editable-content/public/favicon.ico
  116. +38 −0 archives/v6-examples/react-table-editable-content/public/index.html
  117. +15 −0 archives/v6-examples/react-table-editable-content/public/manifest.json
  118. +52 −0 archives/v6-examples/react-table-editable-content/src/Utils.js
  119. +52 −0 archives/v6-examples/react-table-editable-content/src/createServiceWorker.js
  120. +5 −0 archives/v6-examples/react-table-editable-content/src/index.css
  121. +73 −0 archives/v6-examples/react-table-editable-content/src/index.js
  122. +13 −0 archives/v6-examples/react-table-editable-content/src/package.json
  123. +21 −0 archives/v6-examples/react-table-fixed-header-vertical-scroll/.gitignore
  124. +1,863 −0 archives/v6-examples/react-table-fixed-header-vertical-scroll/README.md
  125. +22 −0 archives/v6-examples/react-table-fixed-header-vertical-scroll/package.json
  126. BIN archives/v6-examples/react-table-fixed-header-vertical-scroll/public/favicon.ico
  127. +38 −0 archives/v6-examples/react-table-fixed-header-vertical-scroll/public/index.html
  128. +15 −0 archives/v6-examples/react-table-fixed-header-vertical-scroll/public/manifest.json
  129. +52 −0 archives/v6-examples/react-table-fixed-header-vertical-scroll/src/Utils.js
  130. +52 −0 archives/v6-examples/react-table-fixed-header-vertical-scroll/src/createServiceWorker.js
  131. +9 −0 archives/v6-examples/react-table-fixed-header-vertical-scroll/src/index.css
  132. +62 −0 archives/v6-examples/react-table-fixed-header-vertical-scroll/src/index.js
  133. +13 −0 archives/v6-examples/react-table-fixed-header-vertical-scroll/src/package.json
  134. +21 −0 archives/v6-examples/react-table-footers/.gitignore
  135. +1,863 −0 archives/v6-examples/react-table-footers/README.md
  136. +23 −0 archives/v6-examples/react-table-footers/package.json
  137. BIN archives/v6-examples/react-table-footers/public/favicon.ico
  138. +38 −0 archives/v6-examples/react-table-footers/public/index.html
  139. +15 −0 archives/v6-examples/react-table-footers/public/manifest.json
  140. +52 −0 archives/v6-examples/react-table-footers/src/Utils.js
  141. +52 −0 archives/v6-examples/react-table-footers/src/createServiceWorker.js
  142. +5 −0 archives/v6-examples/react-table-footers/src/index.css
  143. +90 −0 archives/v6-examples/react-table-footers/src/index.js
  144. +14 −0 archives/v6-examples/react-table-footers/src/package.json
  145. +21 −0 archives/v6-examples/react-table-functional-rendering/.gitignore
  146. +1,863 −0 archives/v6-examples/react-table-functional-rendering/README.md
  147. +23 −0 archives/v6-examples/react-table-functional-rendering/package.json
  148. BIN archives/v6-examples/react-table-functional-rendering/public/favicon.ico
  149. +38 −0 archives/v6-examples/react-table-functional-rendering/public/index.html
  150. +15 −0 archives/v6-examples/react-table-functional-rendering/public/manifest.json
  151. +52 −0 archives/v6-examples/react-table-functional-rendering/src/Utils.js
  152. +52 −0 archives/v6-examples/react-table-functional-rendering/src/createServiceWorker.js
  153. +5 −0 archives/v6-examples/react-table-functional-rendering/src/index.css
  154. +112 −0 archives/v6-examples/react-table-functional-rendering/src/index.js
  155. +14 −0 archives/v6-examples/react-table-functional-rendering/src/package.json
  156. +21 −0 archives/v6-examples/react-table-multiple-pagination-bars/.gitignore
  157. +1,863 −0 archives/v6-examples/react-table-multiple-pagination-bars/README.md
  158. +22 −0 archives/v6-examples/react-table-multiple-pagination-bars/package.json
  159. BIN archives/v6-examples/react-table-multiple-pagination-bars/public/favicon.ico
  160. +38 −0 archives/v6-examples/react-table-multiple-pagination-bars/public/index.html
  161. +15 −0 archives/v6-examples/react-table-multiple-pagination-bars/public/manifest.json
  162. +52 −0 archives/v6-examples/react-table-multiple-pagination-bars/src/Utils.js
  163. +52 −0 archives/v6-examples/react-table-multiple-pagination-bars/src/createServiceWorker.js
  164. +5 −0 archives/v6-examples/react-table-multiple-pagination-bars/src/index.css
  165. +60 −0 archives/v6-examples/react-table-multiple-pagination-bars/src/index.js
  166. +13 −0 archives/v6-examples/react-table-multiple-pagination-bars/src/package.json
  167. +21 −0 archives/v6-examples/react-table-pivoting-and-aggregation/.gitignore
  168. +1,863 −0 archives/v6-examples/react-table-pivoting-and-aggregation/README.md
  169. +23 −0 archives/v6-examples/react-table-pivoting-and-aggregation/package.json
  170. BIN archives/v6-examples/react-table-pivoting-and-aggregation/public/favicon.ico
  171. +38 −0 archives/v6-examples/react-table-pivoting-and-aggregation/public/index.html
  172. +15 −0 archives/v6-examples/react-table-pivoting-and-aggregation/public/manifest.json
  173. +52 −0 archives/v6-examples/react-table-pivoting-and-aggregation/src/Utils.js
  174. +52 −0 archives/v6-examples/react-table-pivoting-and-aggregation/src/createServiceWorker.js
  175. +5 −0 archives/v6-examples/react-table-pivoting-and-aggregation/src/index.css
  176. +73 −0 archives/v6-examples/react-table-pivoting-and-aggregation/src/index.js
  177. +14 −0 archives/v6-examples/react-table-pivoting-and-aggregation/src/package.json
  178. +21 −0 archives/v6-examples/react-table-pivoting-options/.gitignore
  179. +1,863 −0 archives/v6-examples/react-table-pivoting-options/README.md
  180. +23 −0 archives/v6-examples/react-table-pivoting-options/package.json
  181. BIN archives/v6-examples/react-table-pivoting-options/public/favicon.ico
  182. +38 −0 archives/v6-examples/react-table-pivoting-options/public/index.html
  183. +15 −0 archives/v6-examples/react-table-pivoting-options/public/manifest.json
  184. +52 −0 archives/v6-examples/react-table-pivoting-options/src/Utils.js
  185. +52 −0 archives/v6-examples/react-table-pivoting-options/src/createServiceWorker.js
  186. +5 −0 archives/v6-examples/react-table-pivoting-options/src/index.css
  187. +151 −0 archives/v6-examples/react-table-pivoting-options/src/index.js
  188. +14 −0 archives/v6-examples/react-table-pivoting-options/src/package.json
  189. +21 −0 archives/v6-examples/react-table-pivoting-sub-components/.gitignore
  190. +1,863 −0 archives/v6-examples/react-table-pivoting-sub-components/README.md
  191. +23 −0 archives/v6-examples/react-table-pivoting-sub-components/package.json
  192. BIN archives/v6-examples/react-table-pivoting-sub-components/public/favicon.ico
  193. +38 −0 archives/v6-examples/react-table-pivoting-sub-components/public/index.html
  194. +15 −0 archives/v6-examples/react-table-pivoting-sub-components/public/manifest.json
  195. +52 −0 archives/v6-examples/react-table-pivoting-sub-components/src/Utils.js
  196. +52 −0 archives/v6-examples/react-table-pivoting-sub-components/src/createServiceWorker.js
  197. +5 −0 archives/v6-examples/react-table-pivoting-sub-components/src/index.css
  198. +101 −0 archives/v6-examples/react-table-pivoting-sub-components/src/index.js
  199. +14 −0 archives/v6-examples/react-table-pivoting-sub-components/src/package.json
  200. +21 −0 archives/v6-examples/react-table-server-side-data/.gitignore
  201. +1,863 −0 archives/v6-examples/react-table-server-side-data/README.md
  202. +23 −0 archives/v6-examples/react-table-server-side-data/package.json
  203. BIN archives/v6-examples/react-table-server-side-data/public/favicon.ico
  204. +38 −0 archives/v6-examples/react-table-server-side-data/public/index.html
  205. +15 −0 archives/v6-examples/react-table-server-side-data/public/manifest.json
  206. +52 −0 archives/v6-examples/react-table-server-side-data/src/Utils.js
  207. +52 −0 archives/v6-examples/react-table-server-side-data/src/createServiceWorker.js
  208. +5 −0 archives/v6-examples/react-table-server-side-data/src/index.css
  209. +118 −0 archives/v6-examples/react-table-server-side-data/src/index.js
  210. +14 −0 archives/v6-examples/react-table-server-side-data/src/package.json
  211. +21 −0 archives/v6-examples/react-table-simple-table (1)/.gitignore
  212. +1,863 −0 archives/v6-examples/react-table-simple-table (1)/README.md
  213. +22 −0 archives/v6-examples/react-table-simple-table (1)/package.json
  214. BIN archives/v6-examples/react-table-simple-table (1)/public/favicon.ico
  215. +38 −0 archives/v6-examples/react-table-simple-table (1)/public/index.html
  216. +15 −0 archives/v6-examples/react-table-simple-table (1)/public/manifest.json
  217. +52 −0 archives/v6-examples/react-table-simple-table (1)/src/Utils.js
  218. +52 −0 archives/v6-examples/react-table-simple-table (1)/src/createServiceWorker.js
  219. +5 −0 archives/v6-examples/react-table-simple-table (1)/src/index.css
  220. +107 −0 archives/v6-examples/react-table-simple-table (1)/src/index.js
  221. +13 −0 archives/v6-examples/react-table-simple-table (1)/src/package.json
  222. +21 −0 archives/v6-examples/react-table-simple-table/.gitignore
  223. +1,863 −0 archives/v6-examples/react-table-simple-table/README.md
  224. +28 −0 archives/v6-examples/react-table-simple-table/package.json
  225. BIN archives/v6-examples/react-table-simple-table/public/favicon.ico
  226. +38 −0 archives/v6-examples/react-table-simple-table/public/index.html
  227. +15 −0 archives/v6-examples/react-table-simple-table/public/manifest.json
  228. +52 −0 archives/v6-examples/react-table-simple-table/src/Utils.js
  229. +52 −0 archives/v6-examples/react-table-simple-table/src/createServiceWorker.js
  230. +5 −0 archives/v6-examples/react-table-simple-table/src/index.css
  231. +71 −0 archives/v6-examples/react-table-simple-table/src/index.js
  232. +19 −0 archives/v6-examples/react-table-simple-table/src/package.json
  233. +21 −0 archives/v6-examples/react-table-sub-components/.gitignore
  234. +1,863 −0 archives/v6-examples/react-table-sub-components/README.md
  235. +22 −0 archives/v6-examples/react-table-sub-components/package.json
  236. BIN archives/v6-examples/react-table-sub-components/public/favicon.ico
  237. +38 −0 archives/v6-examples/react-table-sub-components/public/index.html
  238. +15 −0 archives/v6-examples/react-table-sub-components/public/manifest.json
  239. +52 −0 archives/v6-examples/react-table-sub-components/src/Utils.js
  240. +52 −0 archives/v6-examples/react-table-sub-components/src/createServiceWorker.js
  241. +5 −0 archives/v6-examples/react-table-sub-components/src/index.css
  242. +98 −0 archives/v6-examples/react-table-sub-components/src/index.js
  243. +13 −0 archives/v6-examples/react-table-sub-components/src/package.json
@@ -0,0 +1,21 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,23 @@
{
"name": "react-table-100k-rows-aggregation",
"version": "0.0.7",
"description": null,
"keywords": [],
"main": "index.js",
"dependencies": {
"react-table": "6.5.3",
"react-dom": "15.5.3",
"react": "15.5.3",
"namor": "1.0.1",
"lodash": "4.17.4"
},
"devDependencies": {
"react-scripts": "1.0.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
@@ -0,0 +1,38 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>

</head>
<body>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
@@ -0,0 +1,15 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "192x192",
"type": "image/png"
}
],
"start_url": "./index.html",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
@@ -0,0 +1,52 @@
import React from "react";
import namor from "namor";
import "./index.css";

const range = len => {
const arr = [];
for (let i = 0; i < len; i++) {
arr.push(i);
}
return arr;
};

const newPerson = () => {
const statusChance = Math.random();
return {
firstName: namor.generate({ words: 1, numbers: 0 }),
lastName: namor.generate({ words: 1, numbers: 0 }),
age: Math.floor(Math.random() * 30),
visits: Math.floor(Math.random() * 100),
progress: Math.floor(Math.random() * 100),
status:
statusChance > 0.66
? "relationship"
: statusChance > 0.33 ? "complicated" : "single"
};
};

export function makeData(len = 5553) {
return range(len).map(d => {
return {
...newPerson(),
children: range(10).map(newPerson)
};
});
}

export const Logo = () =>
<div style={{ margin: '1rem auto', display: 'flex', flexWrap: 'wrap', alignItems: 'center', justifyContent: 'center'}}>
For more examples, visit {''}
<br />
<a href="https://github.com/react-tools/react-table" target="_blank">
<img
src="https://github.com/react-tools/media/raw/master/logo-react-table.png"
style={{ width: `150px`, margin: ".5em auto .3em" }}
/>
</a>
</div>;

export const Tips = () =>
<div style={{ textAlign: "center" }}>
<em>Tip: Hold shift when sorting to multi-sort!</em>
</div>;
@@ -0,0 +1,52 @@
// In production, we register a service worker to serve assets from local cache.

// This lets the app load faster on subsequent visits in production, and gives
// it offline capabilities. However, it also means that developers (and users)
// will only see deployed updates on the "N+1" visit to a page, since previously
// cached resources are updated in the background.

// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.
// This link also includes instructions on opting out of this behavior.

export default function register() {
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
window.addEventListener('load', () => {
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
navigator.serviceWorker
.register(swUrl)
.then(registration => {
// eslint-disable-next-line no-param-reassign
registration.onupdatefound = () => {
const installingWorker = registration.installing;
installingWorker.onstatechange = () => {
if (installingWorker.state === 'installed') {
if (navigator.serviceWorker.controller) {
// At this point, the old content will have been purged and
// the fresh content will have been added to the cache.
// It's the perfect time to display a "New content is
// available; please refresh." message in your web app.
console.log('New content is available; please refresh.'); // eslint-disable-line no-console
} else {
// At this point, everything has been precached.
// It's the perfect time to display a
// "Content is cached for offline use." message.
console.log('Content is cached for offline use.'); // eslint-disable-line no-console
}
}
};
};
})
.catch(error => {
console.error('Error during service worker registration:', error);
});
});
}
}

export function unregister() {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.ready.then(registration => {
registration.unregister();
});
}
}
@@ -0,0 +1,5 @@
body {
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight: 300;
font-size: 14px;
}
@@ -0,0 +1,85 @@
import React from "react";
import { render } from "react-dom";
import { makeData, Logo, Tips } from "./Utils";
import _ from "lodash";

// Import React Table
import ReactTable from "react-table";
import "react-table/react-table.css";

class App extends React.Component {
constructor() {
super();
this.state = {
data: makeData(100000)
};
}
render() {
const { data } = this.state;
return (
<div>
<br />
<strong>Note: Having the console open will slow performance</strong>
<br />
<br />

<ReactTable
data={data}
columns={[
{
Header: "Name",
columns: [
{
Header: "First Name",
accessor: "firstName"
},
{
Header: "Last Name",
id: "lastName",
accessor: d => d.lastName
}
]
},
{
Header: "Info",
columns: [
{
Header: "Age",
accessor: "age",
aggregate: vals => _.round(_.mean(vals)),
Aggregated: row => {
return (
<span>
{row.value} (avg)
</span>
);
}
},
{
Header: "Visits",
accessor: "visits",
aggregate: vals => _.sum(vals)
}
]
}
]}
pivotBy={["firstName", "lastName"]}
defaultPageSize={10}
className="-striped -highlight"
SubComponent={row => {
return (
<div style={{ padding: "20px" }}>
<em>Sub Component!</em>
</div>
);
}}
/>
<br />
<Tips />
<Logo />
</div>
);
}
}

render(<App />, document.getElementById("root"));
@@ -0,0 +1,14 @@
{
"name": "react-table-100k-rows-aggregation",
"version": "1.0.0",
"description": "",
"keywords": [],
"main": "index.js",
"dependencies": {
"react-table": "6.5.3",
"react-dom": "15.5.3",
"react": "15.5.3",
"namor": "1.0.1",
"lodash": "4.17.4"
}
}
@@ -0,0 +1,5 @@
{
"infiniteLoopProtection": false,
"hardReloadOnChange": false,
"view": "browser"
}
@@ -0,0 +1,21 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
Oops, something went wrong.

0 comments on commit 8b07b2c

Please sign in to comment.
You can’t perform that action at this time.