Skip to content

Commit 135c1da

Browse files
Merge pull request #339 from dgutride/fix-list-doc
Improve list item documentation when using expanding content.
2 parents 8a4d209 + 059fac5 commit 135c1da

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/views/listview/list-view-directive.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Pass a customScope object containing any scope variables/functions you need to access from the transcluded source, access these
88
* via 'customScope' in your transcluded hmtl.
99
* <br><br>
10-
* If using expanding rows, use a list-expanded-content element containing expandable content for each row. For each item in the items array, the expansion can be disabled by setting disableRowExpansion to true on the item.
10+
* If using expanding rows, use a list-expanded-content element containing expandable content for each row. Item data can be accessed inside list-expanded-content by using $parent.item.property. For each item in the items array, the expansion can be disabled by setting disableRowExpansion to true on the item.
1111
*
1212
* @param {array} items Array of items to display in the list view. If an item in the array has a 'rowClass' field, the value of this field will be used as a class specified on the row (list-group-item).
1313
* @param {object} config Configuration settings for the list view:
@@ -79,17 +79,16 @@
7979
</div>
8080
</div>
8181
<list-expanded-content>
82-
{{item.city}}
8382
<div class="row">
8483
<div class="col-md-3">
8584
<div pf-donut-pct-chart config="exampleChartConfig" data="{'used': '350','total': '1000'}" center-label="'Percent Used'"></div>
8685
</div>
8786
<div class="col-md-9">
8887
<dl class="dl-horizontal">
89-
<dt>Host Name</dt>
90-
<dd>Hostceph1</dd>
91-
<dt>Device Path</dt>
92-
<dd>/dev/disk/pci-0000.05:00-sas-0.2-part1</dd>
88+
<dt>Host</dt>
89+
<dd>{{$parent.item.city}}</dd>
90+
<dt>Admin</dt>
91+
<dd>{{$parent.item.name}}</dd>
9392
<dt>Time</dt>
9493
<dd>January 15, 2016 10:45:11 AM</dd>
9594
<dt>Severity</dt>

0 commit comments

Comments
 (0)