-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathproperties.html
608 lines (598 loc) · 21.1 KB
/
properties.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Basic Page Needs
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta charset="utf-8">
<title>Griddle - React Grid Component</title>
<meta name="description" content="Griddle - React Grid component. ">
<meta name="author" content="Ryan Lanciaux">
<!-- Mobile Specific Metas
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- FONT
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link href='//fonts.googleapis.com/css?family=Raleway:400,300,600' rel='stylesheet' type='text/css'>
<!-- CSS
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="stylesheet" href="styles/normalize.css">
<link rel="stylesheet" href="styles/skeleton.css">
<link rel="stylesheet" href="styles/site.css">
<link rel="stylesheet" href="styles/chartist.css">
<!-- Favicon
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="icon" type="image/png" href="images/favicon.png" />
<!-- Scripts
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.0.0/react.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.0.0/react-dom.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/react/0.13.2/JSXTransformer.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js"></script>
<script src="scripts/Griddle.js"></script>
<script src="scripts/GriddleWithCallback.js"></script>
<script src="scripts/fakeData.js"></script>
<script src="scripts/ChartistGraph.js"></script>
</head>
<body id="docs-page">
<header class="background-primary-dark border-bottom border-secondary">
<div class="container">
<div class="row">
<div class="eight columns">
<a href="index.html"><img src="images/griddle.png" alt="Griddle"/></a>
</div>
<div class="four columns right">
<iframe src="http://ghbtns.com/github-btn.html?user=GriddleGriddle&repo=Griddle&type=watch&count=true"
allowtransparency="true" frameborder="0" scrolling="0" width="90" height="20"></iframe>
<iframe src="http://ghbtns.com/github-btn.html?user=GriddleGriddle&repo=Griddle&type=fork&count=true"
allowtransparency="true" frameborder="0" scrolling="0" width="90" height="20"></iframe>
<br />
<a href="quickstart.html" class="button border-light text-light big">Documentation</a>
</div>
</div>
</div>
</header>
<div class="container page-content">
<div class="row">
<div class="two columns">
<nav class="side">
<ul>
<li><a href="quickstart.html">Quickstart</a></li>
<li><a href="styling.html">Styling</a></li>
<li><a href="subgrids.html">Subgrids</a></li>
<li><a href="customization.html">Customization</a></li>
<li><a href="externalData.html">External Data</a></li>
<li><a href="infiniteScroll.html">Infinite Scrolling</a></li>
<li><a href="properties.html">Properties</a></li>
<li class="border-top border-lighter-grey"><a href="https://reactjsnews.com/isomorphic-javascript-with-react-node/">Isomorphic Rendering <small>(at ReactJS News)</small></a>
</ul>
</nav>
</div>
<div class="ten columns docs">
<h2 id="properties">Properties</h2>
<p><style type="text/css">
dl{ margin-left: 0px;}
</style></p>
<div id="griddle-properties"></div>
<script type="text/jsx">
var propertiesItem = [
{
"property": "columns",
"description": "The columns that should be displayed by default. The other columns can be chosen via the grid settings. If no columns are set, Griddle will display all columns by default",
"type": "array",
"default": "[]"
},
{
"property": "columnMetadata",
"description": "Behavior and properties for the columns within the grid",
"type": "array",
"default": "[]",
"children":[
{
"property": "columnName",
"description": "The name of the column that this metadata applies to.",
"type": "string",
"default": null
},
{
"property": "order",
"description": "The order that this column should appear regardless of how the columns object is defined.",
"type": "int",
"default": null
},
{
"property": "locked",
"description": "Determines whether or not the user can disable this column from the settings.",
"type": "bool",
"default": "false"
},
{
"property": "cssClassName",
"description" : "The css className that should be applied to this column.",
"type": "string",
"default": null
}
]
},
{
"property": "results",
"description": "The data that should be displayed within the grid. This data needs to be an array of JSON objects.",
"type": "array",
"default": "[]"
},
{
"property": "resultsPerPage",
"description": "The number of results that should be displayed on each page. If 'getExternalResults' is defined, this value will be what's used as the 'pageSize' argument.",
"type": "int",
"default": "5"
},
{
"property": "initialSort",
"description": "The column that the grid should be sorted on initially. By default, this is an empty string so the data will be sorted as it's received",
"type": "string",
"default": ""
},
{
"property": "initialSortAscending",
"description": "The direction that the grid should be sorted on initially. By default, this is true.",
"type": "bool",
"default": "true"
},
{
"property": "gridClassName",
"description": "The CSS class name to apply to the griddle elements.",
"type": "string",
"default": ""
},
{
"property": "tableClassName",
"description" : "The CSS class name to apply to the table elements.",
"type": "string",
"default": ""
},
{
"property": "customFormatClassName",
"description": "The CSS class name to apply to the custom format wrapper.",
"type": "string",
"default": ""
},
{
"property": "settingsText",
"description": "The text value to use for toggling the settings area.",
"type": "string",
"default": "Settings"
},
{
"property": "filterPlaceholderText",
"description": "The text to be displayed as a placeholder in the filter text box.",
"type": "string",
"default": "Filter Results"
},
{
"property": "nextText",
"description": "The text on the button that moves to the next page of results.",
"type": "string",
"default": "Next"
},
{
"property": "previousText",
"description": "The text on the button that moves to the previous page of results.",
"type": "string",
"default": "Previous"
},
{
"property": "maxRowsText",
"description": "The text that appears in the Settings / Column chooser next to the select box for page size",
"type": "string",
"default": "Rows per page"
},
{
"property": "enableCustomFormatText",
"description": "The text that appears in the Settings / Column chooser next to the check box to enable custom formatting",
"type": "string",
"default": "Enable Custom Formatting"
},
{
"property": "childrenColumnName",
"description": "The name of the column that contains a list of child items for a given object.",
"type": "string",
"default": "children"
},
{
"property": "metadataColumns",
"description": "List of columns that should not be rendered.",
"type": "array",
"default": "[]"
},
{
"property": "showFilter",
"description": "Whether or not to display the \"Filter\" section of Griddle.",
"type": "bool",
"default": "false"
},
{
"property": "useCustomFilterer",
"description": "Determines if a custom filter function is used",
"type": "bool",
"default": "false"
},
{
"property": "customFilterer",
"description": "The function called when the filter is changed. Expects items and the query, returns filtered items",
"type": "function",
"default": "null"
},
{
"property": "useCustomFilterComponent",
"description": "Determines if a custom filter component is used",
"type": "bool",
"default": "false"
},
{
"property": "customFilterComponent",
"description": "The component that is rendered above the table for filtering",
"type": "React Component",
"default": "null"
},
{
"property": "showSettings",
"description": "Whether or not to display the \"Settings\" section of Griddle.",
"type": "bool",
"default": "false"
},
{
"property": "useCustomRowComponent",
"description": "Determines if a custom row format component is used",
"type": "bool",
"default": "false"
},
{
"property": "useCustomGridComponent",
"description": "Determines if a custom grid format component is used",
"type": "bool",
"default": "false"
},
{
"property": "useCustomPagerComponent",
"description": "Determines if a custom pager component is used",
"type": "bool",
"default": "false"
},
{
"property": "useGriddleStyles",
"description": "Determines if the inline, default styles for Griddle are used. When disabled Griddle will render as a simple table (unless infinite turned on)",
"type": "bool",
"default": "true"
},
{
"property": "customRowComponent",
"description": "The component that should be rendered for each data row.",
"type": "React Component",
"default": "null"
},
{
"property": "customGridComponent",
"description": "The component that should be rendered instead of the overall grid.",
"type": "React Component",
"default": "null"
},
{
"property": "customPagerComponent",
"description": "The component that should be rendered instead of the default pagination component",
"type": "React Component",
"default": "{}"
},
{
"property": "enableToggleCustom",
"description": "Determines whether or not the option to toggle between custom component and default grid is available in the settings",
"type": "bool",
"default": "false"
},
{
"property": "noDataMessage",
"description": "The message to display when no data is available.",
"type": "string",
"default": "There is no data to display."
},
{
"property": "customNoDataComponent",
"description": "The component to display when there is no data available.",
"type": "React Component",
"default": "null"
},
{
"property": "showTableHeading",
"description": "Determines if the table heading should be displayed.",
"type": "bool",
"default": "true"
},
{
"property": "showPager",
"description": "Determines if the pagination controls should be displayed.",
"type": "bool",
"default": "true"
},
{
"property": "useFixedHeader",
"description": "Determines if the table header should stay in the same place while table data is scrolled.",
"type": "bool",
"default": "false"
},
{
"property": "useExternal",
"description": "States that the data should be loaded externally rather than all at once.",
"type": "bool",
"default": "false"
},
{
"property": "externalSetPage",
"description": "The method that will be called when the grid changes pages.",
"type": "function",
"default": "null"
},
{
"property": "externalChangeSort",
"description": "The method that will be called when the column sort is changed.",
"type": "function",
"default": "null"
},
{
"property": "externalSetFilter",
"description": "The method that will be called when the filter is changed.",
"type": "function",
"default": "null"
},
{
"property": "externalSetPageSize",
"description": "The method that will be called when the page size is requested to change.",
"type": "function",
"default": "null"
},
{
"property": "externalMaxPage",
"description": "The max page for the current data set.",
"type": "int",
"default": "null"
},
{
"property": "externalCurrentPage",
"description": "The page of data that is currently being displayed.",
"type": "int",
"default": "null"
},
{
"property": "externalSortColumn",
"description": "The column that is currently sorted.",
"type": "string",
"default": "null"
},
{
"property": "externalSortAscending",
"description": "Whether the data is sorted in ascending or descending order",
"type": "bool",
"default": "null"
},
{
"property": "externalLoadingComponent",
"description": "The component that should be displayed when the data is loading.",
"type": "React Component",
"default": "null"
},
{
"property": "externalIsLoading",
"description": "Whether or not the loading component should be displayed instead of grid data.",
"type": "bool",
"default": "false"
},
{
"property": "enableInfiniteScroll",
"description": "Should infinite scrolling be enabled.",
"type": "bool",
"default": "false"
},
{
"property": "bodyHeight",
"description": "The height, in pixels, of the grid body.",
"type": "int",
"default": "null"
},
{
"property": "paddingHeight",
"description": "The height, in pixels, of the the top/bottom padding used inside of a row. Only used when 'useGriddleStyles' is true.",
"type": "int",
"default": "5"
},
{
"property": "rowHeight",
"description": "The minimum height, in pixels, of a row. Only used when 'useGriddleStyles' is true.",
"type": "int",
"default": "25"
},
{
"property": "infiniteScrollLoadTreshold",
"description": "The height, in pixels, used to trigger paging. Changing this property should be a pretty rare occurrence.",
"type": "int",
"default": "50"
},
{
"property": "useFixedLayout",
"description": "Whether or not a fixed table layout should be used.",
"type": "bool",
"default": "true"
},
{
"property": "isSubGriddle",
"description": "Is the current grid a child of another Griddle component. (This should mainly be used for SubGrids by Griddle).",
"type": "bool",
"default": "false"
},
{
"property": "enableSort",
"description": "Determines if sorting is enabled.",
"type": "bool",
"default": "true"
},
{
"property": "sortAscendingClassName",
"description": "When sorted in ascending order, the CSS class name to apply to the th of the currently sorted column.",
"type": "string",
"default": "sort-ascending"
},
{
"property": "sortDescendingClassName",
"description": "When sorted in descending order, the CSS class name to apply to the th of the currently sorted column",
"type": "string",
"default": "sort-descending"
},
{
"property": "parentRowCollapsedClassName",
"description": "The CSS class that is applied to a row that contains child records when the records are not being displayed.",
"type": "string",
"default": "parent-row"
},
{
"property": "parentRowExpandedClassName",
"description": "The CSS class that is applied to a row that contains child records when the records are currently displayed.",
"type": "string",
"default": "parent-row expanded"
},
{
"property": "settingsToggleClassName",
"description": "The CSS class that is applied to the settings toggle button that is (by default) at the top right of Griddle.",
"type": "string",
"default": "settings"
},
{
"property": "nextClassName",
"description": "The CSS class name to apply to the pagination \"next\" control.",
"type": "string",
"default": "griddle-next"
},
{
"property": "previousClassName",
"description": "The CSS class name to apply to the pagination \"previous\" control.",
"type": "string",
"default": "griddle-previous"
},
{
"property": "sortAscendingComponent",
"description": "The component to display in a th element when the column is sorted in ascending order. This component will be to the right of the column heading text.",
"type": "string",
"default": " ▲"
},
{
"property": "sortDescendingComponent",
"description": "The component to display in a th element when the column is sorted in descending order. This component will be to the right of the column heading text.",
"type": "string",
"default": " ▼"
},
{
"property": "parentRowCollapsedComponent",
"description": "The component to the left of the first column of a grid row that contains child records when those records are not currently displayed.",
"type": "string",
"default": " ▶"
},
{
"property": "parentRowExpandedComponent",
"description": "The component to the left of the first column of a grid row that contains child records when those records are currently displayed.",
"type": "string",
"default": " ▼"
},
{
"property": "settingsIconComponent",
"description": "The component to display to the right of the \"Settings\" text.",
"type": "string",
"default": ""
},
{
"property": "nextIconComponent",
"description": "The component that should be displayed to the right of the \"Next\" text in the pagination component.",
"type": "string",
"default": ""
},
{
"property": "previousIconComponent",
"description": "The component that should be displayed to the left of the \"Previous\" text in the pagination component.",
"type": "string",
"default": ""
},
{
"property": "onRowClick",
"description": "A function that should be called when a row has been clicked. The 'gridRow' and event will be passed in as arguments.",
"type": "function",
"default": "null"
},
{
"property": "onRowMouseEnter",
"description": "A function that should be called when a mouse entered a row. The 'gridRow' and event will be passed in as arguments.",
"type": "function",
"default": "null"
},
{
"property": "onRowMouseLeave",
"description": "A function that should be called when a mouse left a row. The 'gridRow' and event will be passed in as arguments.",
"type": "function",
"default": "null"
},
{
"property": "onRowWillMount",
"description": "A function that should be called before a row was mounted. The 'gridRow' will be passed in as argument.",
"type": "function",
"default": "null"
},
{
"property": "onRowWillUnmount",
"description": "A function that should be called before a row was unmounted. The 'gridRow' will be passed in as argument.",
"type": "function",
"default": "null"
}
];
var DefinitionItem = React.createClass({
getDefaultProps: function() {
return { "data": {
"property": "",
"description":"",
"type": "",
"default": ""
}}
},
render: function(){
return (
<dl>
<dt>{this.props.data.property}</dt>
<dd><strong>{this.props.data.type}</strong> - {this.props.data.description} <span className="text-light-grey">Default: {this.props.data.default}</span>
</dd>
</dl>
)
}
})
ReactDOM.render(<Griddle results={propertiesItem} useCustomRowComponent={true} customRowComponent={DefinitionItem} useGriddleStyles={false} showFilter={true} tableClassName="table" resultsPerPage={100} columnMetadata={propertyGridMeta} showPager={false} enableToggleCustom={true}/>, document.getElementById('griddle-properties'));
</script>
</div>
</div>
</div>
<div class="order-primary content-section background-darker-grey text-light-grey" id="about">
<div class="container">
<div class="row">
<div class="ten columns offset-by-two">
<p>Griddle is a project maintained by <a href="http://twitter.com/ryanlanciaux">Ryan Lanciaux</a> and <a href="http://www.twitter.com/joellanciaux">Joel Lanciaux</a> in collaboration with all of <a href="https://github.com/GriddleGriddle/Griddle/graphs/contributors">the awesome contributors!</a></p>
<small>
© 2015 <a href="http://www.twitter.com/ryanlanciaux">Ryan Lanciaux</a> | <a href="https://www.github.com/DynamicTyped">DynamicTyped</a>
</small>
<br />
<small>
Example data has been generated with <a href="http://json-generator.com">json-generator.com</a>. Any data that resembles real people, places, companies, etc. is coincidence.
</small>
</div>
</div>
</div>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-58716212-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>