- NgTableParams: datasetChanged event fires too early (9706a60b)
- select-filter: select lists should not display an empty and '-' option (1ee441be)
- NgTableParams: generatePagesArray can be called without arguments (25fc82bd)
- ngTableController:
- NgTableController: optimize calls to reload (e94ca5f7)
- NgTableParams:
- ngTableController: automatically reload table when settings data array changes (4817c203)
- ngTableDefaultGetData: new service for applying NgTableParam filters (etc) to a data array (bdf5d9ee)
- ngTableEventsChannel: publish strongly typed events using explicit service (1f3e7e4c)
- ngTableFilterConfig: setConfig now merges with previous config values (155ef620)
- ngTableController: don't trigger reload whilst a reload is already in-flight (97d09ca4)
- ngTableFilterConfig: allow template urls for filters to be customized (032f6ff6)
- header.html: due to 47460d67,
The sortBy function previously declared by ngTableController
has been moved to the new controller
-
ngTableSorterRowController
. -
ngTableController: due to 97d09ca4,
Calls to NgTableParams.filter
, NgTableParams.sorting
(etc) made in the then
method of
the promise returned by NgTableParams.reload
will NOT trigger a subsequent call to NgTableParams.reload
;
the call to NgTableParams.reload
must now be explicitly be made.
Previously:
tableParams.reload().then(function(){
if (!tableParams.total() && _.size(tableParams.filter()) > 0) {
tableParams.filter({});
}
});
Now:
tableParams.reload().then(function(){
if (!tableParams.total() && _.size(tableParams.filter()) > 0) {
tableParams.filter({});
return tableParams.reload();
}
});
- ngTableController: add function to parse the expression used to initialise ngTableDynamic (e9333f98)
- ngTable+ngTableDynamic: due to b226dec9,
- showing/hiding columns now uses ng-if; ng-show is no longer supported
Previously:
<tr>
<td ng-show="showColExpr">
</tr>
Now:
<tr>
<td ng-if="showColExpr">
</tr>
- header.html: due to 6bb2aba8, anyone who relied on a specific 'position' field to order table columns will now need to change the order items's in the column array
Previously:
cols[1].position = 2;
cols[2].position = 1;
Now:
var swappedCol = cols[2];
cols[2] = cols[1];
cols[1] = swappedCol;
- example: updated code due to documentation total should be a number (ce15e94a)
- header.html: allow reordering of columns (23236e6f)
- ngTableDynamic: add a column on the fly (01682774)
- pagination: add setting paginationMaxBlocks now you can define the count of pagination blocks, minimum is 6 (bbdfaf38)
- ngTable: added setting sortingIndicator to show sorting indicator whether near header title or to the very right (10cdf358)
- ngTableController:
- filters:
- header:
- ngTable:
- ngTableDynamic: new directive that accepts dynamic array of columns (03854d33)
- column: due to 7e8448dc,
- Binding expressions used for generating
thead>th
attributes that reference the current column will need modifying
Previously:
<td title="getTitle(column)">
Now:
<td title="getTitle($column)">
- directive: due to 3113e340,
- Fields previously stored directly on a column object are now only available via the prototype chain
This will affect you only if you are enumerating / specifically checking for "own properties" of the column object.
- filters:
- due to c2f83b98,
Custom header.html templates will need to pass the current scope as a parameter to column.filter.
Previously:
<!-- snip -->
<div ng-repeat="(name, filter) in column.filter">
<!-- snip -->
... now becomes:
<!-- snip -->
<div ng-repeat="(name, filter) in column.filter(this)">
<!-- snip -->
- filters:
- due to 53ec5f93,
- $$name field on filter definitions is not supported.
Previously:
<td filter="{'username': 'text', $$name: 'username'}"</td>
... now becomes:
<td filter="{'username': 'text'}"</td>
- column.filterName has been dropped as this is no longer applicable. Custom filter templates will need to change.
Previously:
<input type="text" name="{{column.filterName}}"
... now becomes:
<input type="text" name="{{name}}"
- Multiple filters defined by the same filter definition will now render each input with a seperate name.
- filters:
- due to 7955f12b,
- column.filterTemplateURL has been dropped as this is no longer applicable. Custom header.html templates will need to change.
Previously:
<tr class="ng-table-filters" ng-init="tableParams">
<th ng-repeat="column in columns" ng-show="column.visible" class="filter">
<div ng-repeat="(name, filter) in column.filter">
<div ng-if="column.filterTemplateURL" ng-show="column.filterTemplateURL">
<div ng-include="column.filterTemplateURL"></div>
</div>
<div ng-if="!column.filterTemplateURL" ng-show="!column.filterTemplateURL">
<div ng-include="'ng-table/filters/' + filter + '.html'"></div>
</div>
</div>
</th>
</tr>
... now becomes:
<tr class="ng-table-filters" ng-init="tableParams">
<th ng-repeat="column in columns" ng-show="column.visible" class="filter">
<div ng-repeat="(name, filter) in column.filter">
<div ng-if="filter.indexOf('/') !== -1" ng-include="filter"></div>
<div ng-if="filter.indexOf('/') === -1" ng-include="'ng-table/filters/' + filter + '.html'"></div>
</div>
</th>
</tr>
- Specifying the url to a filter template has changed.
Previously:
<td filter="{ 'name': 'text', templateURL: 'path/to/textFilter.html'}"</td>
... now becomes:
<td filter="{ 'name': 'path/to/textFilter.html'}"</td>
- Multiple filters defined by the same filter definition will now specify their own url.
Previously:
<td filter="{
'fname': 'text',
'lname': 'text',
templateURL: 'path/to/textFilter.html'}"</td>
... now becomes:
<td filter="{
'fname': 'path/to/textFilter.html',
'lname': 'path/to/textFilter.html'}"</td>
- header:
- due to 699b2a58,
parse method on the ngTable scope has been removed as it's no longer required
- header:
- due to 60de2066,
Previously, a css class was added to TH elements thusly:
<tr ng-repeat="row in $data">
<td header-class="myHeaderClass"></td>
</tr>
Now:
<tr ng-repeat="row in $data">
<td header-class="'myHeaderClass'"></td>
</tr>
- add pagination directive ngTablePagination (see usage)
- rename filter.name to filter.$$name according to issue #196
- add debugMode setting
- add defaultSort setting
- add filterDelay setting
- add multisorting (click on header with Ctrl-key)
- add css classes (ng-table-pager, ng-table-pagination, ng-table-counts)
- add support of
header-class
attribute - add fixes for compatibility with early versions of AngularJS
- add
data
field to ngTableParams - Allow expressions in the sortable & filter attribute (Issue #93)
- I abandoned from CoffeeScript in favor of a javascript, fully agree with http://blog.ponyfoo.com/2013/09/28/we-dont-want-your-coffee & (rus) http://habrahabr.ru/post/195944/
- added examples of table with grouping
- fully rewrited interface of ngTableParams
In functions that return data for the filters were removed .promise
$scope.names = function(column) {
...
def.resolve(names);
// return def.promise; - old code
return def;
};