|
7 | 7 | <div class="description"><div class="ui-grid-treebase-service-page ui-grid-treebase-service-uigridtreebaseservice-page"><p>Services for treeBase feature</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/tree-base/src/js/tree-base.js#L1165" class="view-source icon-eye-open"> </a><h3 id="methods_addorusenode">addOrUseNode(grid, row, parents, aggregationBase)</h3> |
| 10 | +<ul class="methods"><li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/tree-base/src/js/tree-base.js#L1181" class="view-source icon-eye-open"> </a><h3 id="methods_addorusenode">addOrUseNode(grid, row, parents, aggregationBase)</h3> |
11 | 11 | <div class="addorusenode"><div class="addorusenode-page"><p>Creates a tree node for this row. If this row already has a treeNode
|
12 | 12 | recorded against it, preserves the state, but otherwise overwrites the data.</p>
|
13 | 13 | </div><h5 id="methods_addorusenode_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="addorusenode-page"><p>The grid we're operating on</p>
|
|
29 | 29 | </div></td></tr></tbody></table><h5 id="methods_adjustsorting_returns">Returns</h5><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-array">array</a></td><td><div class="adjustsorting-page"><p>renderableRows that we passed on through</p>
|
30 | 30 | </div></td></tr></table></div>
|
31 | 31 | </li>
|
32 |
| -<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/tree-base/src/js/tree-base.js#L1373" class="view-source icon-eye-open"> </a><h3 id="methods_aggregate">aggregate(grid, row, parents)</h3> |
| 32 | +<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/tree-base/src/js/tree-base.js#L1389" class="view-source icon-eye-open"> </a><h3 id="methods_aggregate">aggregate(grid, row, parents)</h3> |
33 | 33 | <div class="aggregate"><div class="aggregate-page"><p>Accumulate the data from this row onto the aggregations for each parent</p>
|
34 | 34 | <p>Iterate over the parents, then iterate over the aggregations for each of those parents,
|
35 | 35 | and perform the aggregation for each individual aggregation</p>
|
|
49 | 49 | </div></td></tr></tbody></table><h5 id="methods_allexpanded_returns">Returns</h5><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-boolean">boolean</a></td><td><div class="allexpanded-page"><p>whether or not the tree is all expanded</p>
|
50 | 50 | </div></td></tr></table></div>
|
51 | 51 | </li>
|
52 |
| -<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/tree-base/src/js/tree-base.js#L1318" class="view-source icon-eye-open"> </a><h3 id="methods_buildaggregationobject">buildAggregationObject(column)</h3> |
| 52 | +<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/tree-base/src/js/tree-base.js#L1334" class="view-source icon-eye-open"> </a><h3 id="methods_buildaggregationobject">buildAggregationObject(column)</h3> |
53 | 53 | <div class="buildaggregationobject"><div class="buildaggregationobject-page"><p>Build the object which is stored on the column for holding meta-data about the aggregation.
|
54 | 54 | This method should only be called with columns which have an aggregation.</p>
|
55 | 55 | </div><h5 id="methods_buildaggregationobject_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>column</td><td><a href="" class="label type-hint type-hint-gridcolumn">GridColumn</a></td><td><div class="buildaggregationobject-page"><p>The column which this object relates to</p>
|
|
114 | 114 | </div></td></tr><tr><td>row</td><td><a href="" class="label type-hint type-hint-gridrow">GridRow</a></td><td><div class="expandrowchildren-page"><p>the row we want to expand</p>
|
115 | 115 | </div></td></tr></tbody></table></div>
|
116 | 116 | </li>
|
117 |
| -<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/tree-base/src/js/tree-base.js#L1501" class="view-source icon-eye-open"> </a><h3 id="methods_finaliseaggregation">finaliseAggregation(row, aggregation)</h3> |
| 117 | +<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/tree-base/src/js/tree-base.js#L1517" class="view-source icon-eye-open"> </a><h3 id="methods_finaliseaggregation">finaliseAggregation(row, aggregation)</h3> |
118 | 118 | <div class="finaliseaggregation"><div class="finaliseaggregation-page"><p>Helper function used to finalize aggregation nodes and footer cells</p>
|
119 | 119 | </div><h5 id="methods_finaliseaggregation_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>row</td><td><a href="" class="label type-hint type-hint-gridrow">gridRow</a></td><td><div class="finaliseaggregation-page"><p>The parent we're finalising</p>
|
120 | 120 | </div></td></tr><tr><td>aggregation</td><td><a href="" class="label type-hint type-hint-aggregation">aggregation</a></td><td><div class="finaliseaggregation-page"><p>The aggregation object manipulated by the aggregationFn</p>
|
121 | 121 | </div></td></tr></tbody></table></div>
|
122 | 122 | </li>
|
123 |
| -<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/tree-base/src/js/tree-base.js#L1535" class="view-source icon-eye-open"> </a><h3 id="methods_finaliseaggregations">finaliseAggregations(row)</h3> |
| 123 | +<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/tree-base/src/js/tree-base.js#L1551" class="view-source icon-eye-open"> </a><h3 id="methods_finaliseaggregations">finaliseAggregations(row)</h3> |
124 | 124 | <div class="finaliseaggregations"><div class="finaliseaggregations-page"><p>Format the data from the aggregation into the rendered text
|
125 | 125 | e.g. if we had label: 'sum: ' and value: 25, we'd create 'sum: 25'.</p>
|
126 | 126 | <p>As part of this we call any formatting callback routines we've been provided.</p>
|
|
132 | 132 | </div><h5 id="methods_finaliseaggregations_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>row</td><td><a href="" class="label type-hint type-hint-gridrow">gridRow</a></td><td><div class="finaliseaggregations-page"><p>the parent we're finalising</p>
|
133 | 133 | </div></td></tr></tbody></table></div>
|
134 | 134 | </li>
|
135 |
| -<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/tree-base/src/js/tree-base.js#L1273" class="view-source icon-eye-open"> </a><h3 id="methods_fixfilter">fixFilter(grid)</h3> |
| 135 | +<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/tree-base/src/js/tree-base.js#L1289" class="view-source icon-eye-open"> </a><h3 id="methods_fixfilter">fixFilter(grid)</h3> |
136 | 136 | <div class="fixfilter"><div class="fixfilter-page"><p>After filtering has run, we need to go back through the tree
|
137 | 137 | and make sure the parent rows are always visible if any of the child rows
|
138 | 138 | are visible (filtering may make a child visible, but the parent may not
|
|
143 | 143 | </div><h5 id="methods_fixfilter_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="fixfilter-page"><p>the grid to fix filters on</p>
|
144 | 144 | </div></td></tr></tbody></table></div>
|
145 | 145 | </li>
|
146 |
| -<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/tree-base/src/js/tree-base.js#L1342" class="view-source icon-eye-open"> </a><h3 id="methods_getaggregations">getAggregations(grid)</h3> |
| 146 | +<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/tree-base/src/js/tree-base.js#L1358" class="view-source icon-eye-open"> </a><h3 id="methods_getaggregations">getAggregations(grid)</h3> |
147 | 147 | <div class="getaggregations"><div class="getaggregations-page"><p>Looks through the grid columns to find those with aggregations,
|
148 | 148 | and collates the aggregation information into an array, returns that array</p>
|
149 | 149 | </div><h5 id="methods_getaggregations_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="getaggregations-page"><p>the grid to get the aggregation information from</p>
|
|
167 | 167 | </div></td></tr><tr><td>targetState</td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="setallnodes-page"><p>the state we want to set it to</p>
|
168 | 168 | </div></td></tr></tbody></table></div>
|
169 | 169 | </li>
|
170 |
| -<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/tree-base/src/js/tree-base.js#L1199" class="view-source icon-eye-open"> </a><h3 id="methods_setcurrentstate">setCurrentState(parents)</h3> |
| 170 | +<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/tree-base/src/js/tree-base.js#L1215" class="view-source icon-eye-open"> </a><h3 id="methods_setcurrentstate">setCurrentState(parents)</h3> |
171 | 171 | <div class="setcurrentstate"><div class="setcurrentstate-page"><p>Looks at the parents array to determine our current state.
|
172 | 172 | If any node in the hierarchy is collapsed, then return collapsed, otherwise return
|
173 | 173 | expanded.</p>
|
174 | 174 | </div><h5 id="methods_setcurrentstate_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>parents</td><td><a href="" class="label type-hint type-hint-array">array</a></td><td><div class="setcurrentstate-page"><p>An array of the parents this row should have</p>
|
175 | 175 | </div></td></tr></tbody></table><h5 id="methods_setcurrentstate_returns">Returns</h5><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="setcurrentstate-page"><p>The state we should be setting to any nodes we see</p>
|
176 | 176 | </div></td></tr></table></div>
|
177 | 177 | </li>
|
178 |
| -<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/tree-base/src/js/tree-base.js#L1228" class="view-source icon-eye-open"> </a><h3 id="methods_sorttree">sortTree(grid)</h3> |
| 178 | +<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/tree-base/src/js/tree-base.js#L1244" class="view-source icon-eye-open"> </a><h3 id="methods_sorttree">sortTree(grid)</h3> |
179 | 179 | <div class="sorttree"><div class="sorttree-page"><p>Performs a recursive sort on the tree nodes, sorting the
|
180 | 180 | children of each node and putting them back into the children array.</p>
|
181 | 181 | <p>Before doing this it turns back on all the sortIgnore - things that were previously
|
|
202 | 202 | </div></td></tr></tbody></table><h5 id="methods_treebasecolumnbuilder_returns">Returns</h5><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-promise">promise</a></td><td><div class="treebasecolumnbuilder-page"><p>promise for the builder - actually we do it all inline so it's immediately resolved</p>
|
203 | 203 | </div></td></tr></table></div>
|
204 | 204 | </li>
|
205 |
| -<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/tree-base/src/js/tree-base.js#L1567" class="view-source icon-eye-open"> </a><h3 id="methods_treefooteraggregationtype">treeFooterAggregationType(rows, column)</h3> |
| 205 | +<li><a href="https://github.com/angular-ui/ui-grid/blob/master/packages/tree-base/src/js/tree-base.js#L1583" class="view-source icon-eye-open"> </a><h3 id="methods_treefooteraggregationtype">treeFooterAggregationType(rows, column)</h3> |
206 | 206 | <div class="treefooteraggregationtype"><div class="treefooteraggregationtype-page"><p>Uses the tree aggregation functions and finalizers to set the
|
207 | 207 | column footer aggregations.</p>
|
208 | 208 | </div><h5 id="methods_treefooteraggregationtype_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>rows</td><td><a href="" class="label type-hint type-hint-rows">rows</a></td><td><div class="treefooteraggregationtype-page"><p>The visible rows. not used, but accepted to match signature of GridColumn.aggregationType</p>
|
|
0 commit comments