Skip to content

Releases: esvit/ng-table

v0.8.1

02 Aug 22:15
Compare
Choose a tag to compare

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)
    • automatically reload table when settings data array changes
      (4817c203)
  • 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)
  • 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)

v0.8.0

25 Jul 17:05
Compare
Choose a tag to compare

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.

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

v0.7.1

20 Jul 10:06
Compare
Choose a tag to compare

Features

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

v0.7.0

13 Jul 00:04
Compare
Choose a tag to compare

Breaking Changes

  • ngTable+ngTableDynamic: due to b226dec9,
  • showing/hiding columns now uses ng-if to improve performance; ng-show is no longer supported

Previously:

<tr>
  <td ng-show="showColExpr">
</tr>

Now:

<tr>
  <td ng-if="showColExpr">
</tr>

v0.6.0

12 Jul 15:26
Compare
Choose a tag to compare

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;

v0.5.5

09 Jul 16:47
Compare
Choose a tag to compare

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

26 Feb 15:31
Compare
Choose a tag to compare
  • sorting indicator setting

v0.5.1

23 Feb 09:07
Compare
Choose a tag to compare
  • fixed sourcemaps
  • pagination is not visible while data not loaded

0.5.0

15 Feb 23:07
Compare
Choose a tag to compare

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

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

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

ngTable v0.4.3

18 Jan 11:01
Compare
Choose a tag to compare
  • getData and reload now return promises;
  • #327
  • 'filter-data' now accept function/array/object variables
  • global default params