Skip to content

Commit c105187

Browse files
committed
Merge pull request #4729 from joeskeen/master
docs(expandable): add documentation for row.isExpanded
2 parents ab82b5a + 01aa0b0 commit c105187

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/features/expandable/js/expandable.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@
9797
*
9898
* @description Public Api for expandable feature
9999
*/
100+
/**
101+
* @ngdoc object
102+
* @name ui.grid.expandable.api:GridRow
103+
*
104+
* @description Additional properties added to GridRow when using the expandable module
105+
*/
100106
/**
101107
* @ngdoc object
102108
* @name ui.grid.expandable.api:GridOptions
@@ -191,6 +197,20 @@
191197
toggleRowExpansion: function (grid, row) {
192198
// trigger the "before change" event. Can change row height dynamically this way.
193199
grid.api.expandable.raise.rowExpandedBeforeStateChanged(row);
200+
/**
201+
* @ngdoc object
202+
* @name isExpanded
203+
* @propertyOf ui.grid.expandable.api:GridRow
204+
* @description Whether or not the row is currently expanded.
205+
* @example
206+
* <pre>
207+
* $scope.api.expandable.on.rowExpandedStateChanged($scope, function (row) {
208+
* if (row.isExpanded) {
209+
* //...
210+
* }
211+
* });
212+
* </pre>
213+
*/
194214
row.isExpanded = !row.isExpanded;
195215
if (angular.isUndefined(row.expandedRowHeight)){
196216
row.expandedRowHeight = grid.options.expandableRowHeight;

0 commit comments

Comments
 (0)