|
7 | 7 | <div class="description"><div class="ui-grid-grouping-service-page ui-grid-grouping-service-uigridgroupingservice-page"><p>Services for grouping features</p>
|
8 | 8 | </div></div>
|
9 | 9 | <div class="member method"><h2 id="methods">Methods</h2>
|
10 |
| -<ul class="methods"><li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/grouping/src/js/grouping.js#L751" class="view-source icon-eye-open"> </a><h3 id="methods_aggregatecolumn">aggregateColumn(grid, column, aggregationType)</h3> |
| 10 | +<ul class="methods"><li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/grouping/src/js/grouping.js#L752" class="view-source icon-eye-open"> </a><h3 id="methods_aggregatecolumn">aggregateColumn(grid, column, aggregationType, aggregationLabel)</h3> |
11 | 11 | <div class="aggregatecolumn"><div class="aggregatecolumn-page"><p>Sets the aggregation type on a column, if the
|
12 | 12 | column is currently grouped then it removes the grouping first.</p>
|
13 | 13 | </div><h5 id="methods_aggregatecolumn_parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>grid</td><td><a href="" class="label type-hint type-hint-grid">Grid</a></td><td><div class="aggregatecolumn-page"><p>grid object</p>
|
14 | 14 | </div></td></tr><tr><td>column</td><td><a href="" class="label type-hint type-hint-gridcolumn">GridColumn</a></td><td><div class="aggregatecolumn-page"><p>the column we want to aggregate</p>
|
15 | 15 | </div></td></tr><tr><td>aggregationType</td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="aggregatecolumn-page"><p>of the recognised types from uiGridGroupingConstants or one of the custom aggregations from gridOptions</p>
|
| 16 | +</div></td></tr><tr><td>aggregationLabel</td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="aggregatecolumn-page"><p>to be used instead of the default label. If empty string is passed, label is omitted</p> |
16 | 17 | </div></td></tr></tbody></table></div>
|
17 | 18 | </li>
|
18 |
| -<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/grouping/src/js/grouping.js#L1200" class="view-source icon-eye-open"> </a><h3 id="methods_applyrowexpandedstates">applyRowExpandedStates(currentNode, expandedStates)</h3> |
| 19 | +<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/grouping/src/js/grouping.js#L1206" class="view-source icon-eye-open"> </a><h3 id="methods_applyrowexpandedstates">applyRowExpandedStates(currentNode, expandedStates)</h3> |
19 | 20 | <div class="applyrowexpandedstates"><div class="applyrowexpandedstates-page"><p>Take a hash in the format as created by getRowExpandedStates,
|
20 | 21 | and apply it to the grid.grouping.groupHeaderCache.</p>
|
21 | 22 | <p>Takes a treeSubset, and applies to a treeSubset - so can be called
|
|
26 | 27 | of that expanded states (which hopefully matches the subset of the groupHeaderCache)</p>
|
27 | 28 | </div></td></tr></tbody></table></div>
|
28 | 29 | </li>
|
29 |
| -<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/grouping/src/js/grouping.js#L827" class="view-source icon-eye-open"> </a><h3 id="methods_cleargrouping">clearGrouping(grid)</h3> |
| 30 | +<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/grouping/src/js/grouping.js#L833" class="view-source icon-eye-open"> </a><h3 id="methods_cleargrouping">clearGrouping(grid)</h3> |
30 | 31 | <div class="cleargrouping"><div class="cleargrouping-page"><p>Clear any grouped columns and any aggregations. Doesn't remove sorting,
|
31 | 32 | as we don't know whether that sorting was added by grouping or was there beforehand</p>
|
32 | 33 | </div><h5 id="methods_cleargrouping_parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>grid</td><td><a href="" class="label type-hint type-hint-grid">Grid</a></td><td><div class="cleargrouping-page"><p>grid object</p>
|
33 | 34 | </div></td></tr></tbody></table></div>
|
34 | 35 | </li>
|
35 |
| -<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/grouping/src/js/grouping.js#L1126" class="view-source icon-eye-open"> </a><h3 id="methods_finaliseprocessingstate">finaliseProcessingState(processingState, stateIndex)</h3> |
| 36 | +<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/grouping/src/js/grouping.js#L1132" class="view-source icon-eye-open"> </a><h3 id="methods_finaliseprocessingstate">finaliseProcessingState(processingState, stateIndex)</h3> |
36 | 37 | <div class="finaliseprocessingstate"><div class="finaliseprocessingstate-page"><p>Set all processing states lower than the one that had a break in value to
|
37 | 38 | no longer be initialised. Render the counts into the entity ready for display.</p>
|
38 | 39 | </div><h5 id="methods_finaliseprocessingstate_parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>processingState</td><td><a href="" class="label type-hint type-hint-array">array</a></td><td><div class="finaliseprocessingstate-page"><p>the current processing state</p>
|
39 | 40 | </div></td></tr><tr><td>stateIndex</td><td><a href="" class="label type-hint type-hint-number">number</a></td><td><div class="finaliseprocessingstate-page"><p>the processing state item that we were on when we triggered a new group header, all
|
40 | 41 | processing states after this need to be finalised</p>
|
41 | 42 | </div></td></tr></tbody></table></div>
|
42 | 43 | </li>
|
43 |
| -<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/grouping/src/js/grouping.js#L1009" class="view-source icon-eye-open"> </a><h3 id="methods_getgrouping">getGrouping(grid)</h3> |
| 44 | +<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/grouping/src/js/grouping.js#L1015" class="view-source icon-eye-open"> </a><h3 id="methods_getgrouping">getGrouping(grid)</h3> |
44 | 45 | <div class="getgrouping"><div class="getgrouping-page"><p>Get the grouping settings from the columns. As a side effect
|
45 | 46 | this always renumbers the grouping starting at 0</p>
|
46 | 47 | </div><h5 id="methods_getgrouping_parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>grid</td><td><a href="" class="label type-hint type-hint-grid">Grid</a></td><td><div class="getgrouping-page"><p>grid object</p>
|
47 | 48 | </div></td></tr></tbody></table><h5 id="methods_getgrouping_returns">Returns</h5><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-array">array</a></td><td><div class="getgrouping-page"><p>an array of the group fields, in order of priority</p>
|
48 | 49 | </div></td></tr></table></div>
|
49 | 50 | </li>
|
50 |
| -<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/grouping/src/js/grouping.js#L1165" class="view-source icon-eye-open"> </a><h3 id="methods_getrowexpandedstates">getRowExpandedStates(treeChildren)</h3> |
| 51 | +<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/grouping/src/js/grouping.js#L1171" class="view-source icon-eye-open"> </a><h3 id="methods_getrowexpandedstates">getRowExpandedStates(treeChildren)</h3> |
51 | 52 | <div class="getrowexpandedstates"><div class="getrowexpandedstates-page"><p>Extract the groupHeaderCache hash, pulling out only the states.</p>
|
52 | 53 | <p>The example below shows a grid that is grouped by gender then age</p>
|
53 | 54 | <pre class="prettyprint linenums">
|
|
81 | 82 | </div></td></tr><tr><td>column</td><td><a href="" class="label type-hint type-hint-gridcolumn">GridColumn</a></td><td><div class="groupcolumn-page"><p>the column we want to group</p>
|
82 | 83 | </div></td></tr></tbody></table></div>
|
83 | 84 | </li>
|
84 |
| -<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/grouping/src/js/grouping.js#L933" class="view-source icon-eye-open"> </a><h3 id="methods_grouprows">groupRows(renderableRows)</h3> |
| 85 | +<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/grouping/src/js/grouping.js#L939" class="view-source icon-eye-open"> </a><h3 id="methods_grouprows">groupRows(renderableRows)</h3> |
85 | 86 | <div class="grouprows"><div class="grouprows-page"><p>The rowProcessor that creates the groupHeaders (i.e. does
|
86 | 87 | the actual grouping).</p>
|
87 | 88 | <p>Assumes it is always called after the sorting processor, guaranteed by the priority setting</p>
|
|
126 | 127 | </div></td></tr></tbody></table><h5 id="methods_groupingcolumnprocessor_returns">Returns</h5><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-array">array</a></td><td><div class="groupingcolumnprocessor-page"><p>updated columns array</p>
|
127 | 128 | </div></td></tr></table></div>
|
128 | 129 | </li>
|
129 |
| -<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/grouping/src/js/grouping.js#L982" class="view-source icon-eye-open"> </a><h3 id="methods_initialiseprocessingstate">initialiseProcessingState(grid)</h3> |
| 130 | +<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/grouping/src/js/grouping.js#L988" class="view-source icon-eye-open"> </a><h3 id="methods_initialiseprocessingstate">initialiseProcessingState(grid)</h3> |
130 | 131 | <div class="initialiseprocessingstate"><div class="initialiseprocessingstate-page"><p>Creates the processing state array that is used
|
131 | 132 | for groupRows.</p>
|
132 | 133 | </div><h5 id="methods_initialiseprocessingstate_parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>grid</td><td><a href="" class="label type-hint type-hint-grid">Grid</a></td><td><div class="initialiseprocessingstate-page"><p>grid object</p>
|
133 | 134 | </div></td></tr></tbody></table><h5 id="methods_initialiseprocessingstate_returns">Returns</h5><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-array">array</a></td><td><div class="initialiseprocessingstate-page"><p>an array in the format described in the groupRows method,
|
134 | 135 | initialised with blank values</p>
|
135 | 136 | </div></td></tr></table></div>
|
136 | 137 | </li>
|
137 |
| -<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/grouping/src/js/grouping.js#L1057" class="view-source icon-eye-open"> </a><h3 id="methods_insertgroupheader">insertGroupHeader(grid, renderableRows, rowIndex, processingState, stateIndex)</h3> |
| 138 | +<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/grouping/src/js/grouping.js#L1063" class="view-source icon-eye-open"> </a><h3 id="methods_insertgroupheader">insertGroupHeader(grid, renderableRows, rowIndex, processingState, stateIndex)</h3> |
138 | 139 | <div class="insertgroupheader"><div class="insertgroupheader-page"><p>Create a group header row, and link it to the various configuration
|
139 | 140 | items that we use.</p>
|
140 | 141 | <p>Look for the row in the oldGroupingHeaderCache, write the row into the new groupingHeaderCache.</p>
|
|
157 | 158 | </div></td></tr></tbody></table><h5 id="methods_movegroupcolumns_returns">Returns</h5><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-array">array</a></td><td><div class="movegroupcolumns-page"><p>updated columns</p>
|
158 | 159 | </div></td></tr></table></div>
|
159 | 160 | </li>
|
160 |
| -<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/grouping/src/js/grouping.js#L784" class="view-source icon-eye-open"> </a><h3 id="methods_setgrouping">setGrouping(grid, config)</h3> |
| 161 | +<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/grouping/src/js/grouping.js#L790" class="view-source icon-eye-open"> </a><h3 id="methods_setgrouping">setGrouping(grid, config)</h3> |
161 | 162 | <div class="setgrouping"><div class="setgrouping-page"><p>Set the grouping based on a config object, used by the save state feature
|
162 | 163 | (more specifically, by the restore function in that feature )</p>
|
163 | 164 | </div><h5 id="methods_setgrouping_parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>grid</td><td><a href="" class="label type-hint type-hint-grid">Grid</a></td><td><div class="setgrouping-page"><p>grid object</p>
|
164 | 165 | </div></td></tr><tr><td>config</td><td><a href="" class="label type-hint type-hint-object">object</a></td><td><div class="setgrouping-page"><p>the config we want to set, same format as that returned by getGrouping</p>
|
165 | 166 | </div></td></tr></tbody></table></div>
|
166 | 167 | </li>
|
167 |
| -<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/grouping/src/js/grouping.js#L863" class="view-source icon-eye-open"> </a><h3 id="methods_tidypriorities">tidyPriorities(grid)</h3> |
| 168 | +<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/grouping/src/js/grouping.js#L869" class="view-source icon-eye-open"> </a><h3 id="methods_tidypriorities">tidyPriorities(grid)</h3> |
168 | 169 | <div class="tidypriorities"><div class="tidypriorities-page"><p>Renumbers groupPriority and sortPriority such that
|
169 | 170 | groupPriority is contiguous, and sortPriority either matches
|
170 | 171 | groupPriority (for group columns), and otherwise is contiguous and
|
|
0 commit comments