Skip to content

Latest commit

 

History

History
923 lines (579 loc) · 27.6 KB

CHANGELOG.md

File metadata and controls

923 lines (579 loc) · 27.6 KB

1.0.0-beta.9 (2015-11-10)

Bug Fixes

  • ngTableController:

1.0.0-beta.8 (2015-10-24)

Features

  • ngTableController: add visibleColumnCount to the the current $data array (8e0b1095)

1.0.0-beta.7 (2015-10-18)

Bug Fixes

  • ngTableParams: reload is never triggered once reload has failed once (4369926c)

1.0.0-beta.6 (2015-10-03)

Bug Fixes

  • ngTableController: should not show filter row when all filterable columns are hidden (9ba4f473)
  • pager: removed margin around buttons (7e6919ea)

Features

  • NgTableParams: support grouping on nested properties (2ec9d189)
  • ngTableColumn: allow $column fields to be model bound as getter/setter's (e705fd9a)

1.0.0-beta.5 (2015-09-18)

Bug Fixes

  • NgTableParams: afterCreated should be the very first event to fire (84d4220c)
  • filterRow.html: header-class should also apply to filter row (eed65436)
  • ngTableController: reference to $column not always available in $column getter functions (adddb27d)

Features

  • ngTableController: display the filter row by default when applicable (103b2be4)

Breaking Changes

The order of events firing has changed.

Previously the datasetChanged event would fire after the afterCreated event. Now afterCreated event will fires first.

A css class specified using the header-class will now be added to the filter row header cell and not just the sorting row.

If you want to continue to apply the css rules only to the cell in the sorting header row you will now need to qualify your css rule with the '.header' css class.

So the following:

.my-customer-header {
    /* rules */
}

... will need to change to:

.header.my-customer-header {
    /* rules */
}

A context object combines and replaces the $scope and locals argument originally supplied to $column getter functions.

This context object prototypically inherits from the original $scope and has the fields from the original locals argument as own properties.

It change is very unlikely to affect you

ngTableColumn.buildColumn now expects a third parameter - a reference to the $columns array that will contain the column being built

1.0.0-beta.4 (2015-09-13)

Breaking Changes

  • NgTableParams.settings().data renamed to NgTableParams.settings().dataset

Previously:

var tp = new NgTableParams({}, {data: yourArray });

Now:

var tp = new NgTableParams({}, {dataset: yourArray });

1.0.0-beta.3 (2015-09-06)

Bug Fixes

  • NgTableParams: thisArg for apply on $log functions should be $log (f8e0a9de)
  • groupRow: should update as group changes externally (7d2965c5)

Features

  • groupRow: add expand/collapse toggle for group rows (32f208b2)
  • ngTableColumnsBinding: new directive that provide access to the $columns array (e290293c)

1.0.0-beta.2 (2015-09-02)

Bug Fixes

  • ngTableSelectFilterDs: not binding to scope an array returned asynchronously (4c063685)

1.0.0-beta.1 (2015-08-29)

Bug Fixes

  • NgTableParams: filterDelay too high (6a3692dc)

Features

  • NgTableParams: optimize filter debounce for in-memory data arrays (8010e07f)

Breaking Changes

Move settings().filterDelay to settings().filterOptions.filterDelay

1.0.0-alpha.8 (2015-08-28)

Bug Fixes

  • NgTableParams: incorrect default sort direction applied to grouping function (7b30995e)
  • groupRow: table columns are lost when switching between groups (6d2c7358)

Features

  • ngTableController: add visibleColumnCount to $groups data (53ed583c)

1.0.0-alpha.7 (2015-08-27)

Bug Fixes

  • NgTableParams: the url method does not URI encoded all parameter values (6e7bf3a7)

Features

  • NgTableParams: improved support for grouping data (1cd90cde)
  • groupRow: extend header with a data group picker (ffa617cb)
  • ngTableDefaultGetData: allow NgTableParams to determine if sorting, filtering, and paging apply (6536d734)

Breaking Changes

  • settings().groupBy renamed and moved to parameters().group

Previously:

var params = new NgTableParams({...}, { groupBy: 'role'});
// changing value:
params.settings({ groupBy: 'age'});

Now:

var params = new NgTableParams({group: 'role'}, {...});
// changing value:
params.group('age');
// OR
params.parameters({ group: { age: undefined }});
  • paging is applied after grouping

This means that groups will no longer be duplicated and split across pages.

All parameter values are now URI encoded, thus a numerical filter value will now be returned as a quoted string

1.0.0-alpha.6 (2015-08-17)

Bug Fixes

  • NgTableParams: table not reloaded when special $ filter field changes (8c287e91)

Features

  • ngTableDefaultGetData: set the this context of the filter function to the current NgTableParams (e23ce330)

1.0.0-alpha.5 (2015-08-16)

Features

  • NgTableParams: set sensible defaults for filterComparator, filterFn and filterName (fc2fa182)
  • ngTableDefaultGetData:
    • support filterComparator, filterFilterName override, and filterFn (a62754c9)
    • support nested property filters (58ee04a6)

1.0.0-alpha.4 (2015-08-15)

Features

  • filters: add ngTableSelectFilterDs directive (c79fdd86)

Breaking Changes

ngTableController no longer adds an empty item to the array returned by $column.filterData.

This will only affect those apps that were using $column.filterData to supply data to a custom filter template.

Those apps that are using the select.html will be unaffected as the select.html filter will add this empty item.

1.0.0-alpha.3 (2015-08-14)

Bug Fixes

  • ngTableController: should be consistent about adding empty option item (d2080600)

Features

  • filters:
    • add filterLayout option to control position of multi-template filters (d1e02ccd)
    • support placeholder attribute for filter input (275f1c88)
    • render a multi-template filter horizontally (c834cc09)

Breaking Changes

An empty item - { id: '', title: '' } - is added to an array returned synchronously by filterData function.

Implications:

  • make sure to not add an empty option yourself as this will be a duplicate
  • your array of items need to have an id and title field so as to match the empty option

1.0.0-alpha.2 (2015-08-12)

Bug Fixes

  • pager.html: don't render empty pagination UL (ffbbca04)

Features

  • ngTableController: allow $column.filterData to return a promise (f90cbcb8)

1.0.0-alpha.1 (2015-08-10)

Bug Fixes

  • ngTableController: should not call reload twice when initial load fails (a01da5bd)

Features

  • NgTableParams: add hasErrorState method (093ba3d9)

1.0.0-alpha (2015-08-10)

Bug Fixes

  • NgTableParams: default page size is unreasonably small (6aec41ca)

Breaking Changes

Default page size has been increased from 1 to 10.

To override this behaviour set the default page size in the a run block:

angular.module("yourApp").run(setRunPhaseDefaults);

setRunPhaseDefaults.$inject = ["ngTableDefaults"];

function setRunPhaseDefaults(ngTableDefaults) {
    ngTableDefaults.params.count = 1;
}

NgTableParams no longer exposes a getGroups method.

getGroups is now a method on the settings object only.

NgTableParams no longer exposes a getData method

The column parameter of the getGroups method has been removed.

Instead the groupBy value on the NgTableParams.settings() object supplied as a parameter will be used to determine the grouping.

Previously:

var groupsFetched = tableParams.settings().getGroups('age');

Now:

tableParams.settings({ groupBy: 'age'});
var groupsFetched = tableParams.settings().getGroups(tableParams);

0.8.3 (2015-08-09)

Bug Fixes

  • ngTableDefaultGetData: should ignore null and undefined filter values (64a33a85)

Features

  • NgTableParams:
    • filter function option to remove insignificant values (2f5f3016)
    • isSortBy direction parameter now optional (b3e02b92)
    • add response error interception (5613d1e0)
  • number.html: new filter template for numbers (78b02bbf)

0.8.2 (2015-08-06)

Bug Fixes

  • NgTableParams: datasetChanged event fires too early (9706a60b)
  • select-filter: select lists should not display an empty and '-' option (1ee441be)

Features

  • NgTableParams: generatePagesArray can be called without arguments (25fc82bd)

0.8.1 (2015-08-02)

Bug Fixes

  • ngTableController:
    • table not reloaded when new NgTableParams bound to scope (d8cbd771)
    • apply filter delay only when relevant (1ed42168)

Features

  • NgTableController: optimize calls to reload (e94ca5f7)
  • NgTableParams:
    • allow getData to return an array of data (ab9ffdfa)
    • add hasFilter function (1163e22c)
    • add isDataReloadRequired and hasFilterChanges methods (95b0f2ba)
    • better default implementation of getData that filters and sorts (8d912609)
    • extend getData with interceptor pipeline (f94c6357)
  • 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)

0.8.0 (2015-07-25)

Bug Fixes

  • ngTableController: don't trigger reload whilst a reload is already in-flight (97d09ca4)

Features

  • ngTableFilterConfig: allow template urls for filters to be customized (032f6ff6)

Breaking Changes

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();
  }
});

0.7.1 (2015-07-20)

Features

  • ngTableController: add function to parse the expression used to initialise ngTableDynamic (e9333f98)

0.7.0 (2015-07-13)

Breaking Changes

  • 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>

0.6.0 (2015-07-12)

Breaking Changes

  • 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;

0.5.5 (2015-07-09)

Bug Fixes

  • example: updated code due to documentation total should be a number (ce15e94a)

Features

  • 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)

v0.5.4 (2015-02-26)

Features

  • ngTable: added setting sortingIndicator to show sorting indicator whether near header title or to the very right (10cdf358)

v0.5.0 (2015-02-15)

Bug Fixes

  • ngTableController:
    • fix regression in recent rename of ngTableParmas to NgTableParams (c7f2ac89)
    • prevent "stackoverflow" exception when data items are recursive data structures (4a344db0)

Features

  • filters:
    • filter expression now has access to scope (c2f83b98)
    • specify the filter template url using the filter value rather than a separate templateUrl field (7955f12b)
  • header:
    • add data-title-text attribute to table cells (43e5c4bf)
    • title and sortable expression now has access to the column definition (699b2a58)
    • header-title (502b717b)
    • header-class attribute is now a data binding expression (60de2066)
  • ngTable:
    • getter methods declared on $column no longer require a $scope to be supplied (f9090b47)
    • add title-alt for displaying an alternative header title for responsive tables (afc14234)
  • ngTableDynamic: new directive that accepts dynamic array of columns (03854d33)

Breaking Changes

  • 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)">
  • 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.

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 -->
  • $$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.
  • 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>

parse method on the ngTable scope has been removed as it's no longer required

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>

v0.3.2 (master)

  • 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)

v0.3.1

  • 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)

v0.3.0

v0.2.2

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;
};