You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-1Lines changed: 29 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,7 +103,7 @@ The options object should be available on the parent scope of the `<ap-mesa>` el
103
103
| bodyHeight |`number`| 300 | The pixel height for the body of the table. Note that unless `fixedHeight` is set to true, this will behave as a max-height. |
104
104
| fillHeight |`boolean`| false | If true, the table will fill the calculated height of the parent element. Note that this overrides `bodyHeight`. The table will listen for `'apMesa:resize'` events from the rootScope to recalculate the height. |
105
105
| fixedHeight |`boolean`| false | If true, the table body will always have a height of `bodyHeight`, regardless of whether the rows fill up the vertical space. |
106
-
| onRegisterApi |`function`| {} | Provides a access to select table controller methods, including selectAll, deselectAll, isSelectedAll, setLoading, etc. |
106
+
| onRegisterApi |`function`| {} | Provides a access to select table controller methods, including selectAll, deselectAll, isSelectedAll, setLoading, etc. See [*Table API*](https://github.com/andyperlitch/angularjs-table#table-api).|
107
107
| getter |`function`| {} | Customize the way to get column value. If not specified, get columen value by row[column.key]|
108
108
| expandableTemplateUrl |`String`| undefined | A template reference to be used for the expandable row feature. See [*Expandable Rows*](https://github.com/andyperlitch/angularjs-table#expandable-rows). |
109
109
| expandableTemplate |`String`| undefined | A template string to be used for the expandable row feature. See [*Expandable Rows*](https://github.com/andyperlitch/angularjs-table#expandable-rows). |
@@ -428,6 +428,34 @@ You can update the value of `enabledColumns` from the outside to manipulate the
428
428
As with normal two-way bound inputs, this value will update as sorting is changed via drag-and-drop by the user.
429
429
430
430
431
+
Table API
432
+
---------
433
+
434
+
When a table is instantiated, it creates an API object with several methods that allow you to programmatically control parts of the table.
435
+
436
+
There are two ways to access the API. One is to use the `onRegisterApi` option, e.g.:
437
+
438
+
```js
439
+
var tableApi;
440
+
$scope.tableOptions= {
441
+
// other options
442
+
onRegisterApi:function(api) {
443
+
tableApi = api;
444
+
}
445
+
}
446
+
```
447
+
448
+
The other way is to use the optional binding on the element itself, e.g.:
0 commit comments