Skip to content

Commit

Permalink
chore(release): 1.0.0-alpha.6 distribution files
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrowhurstram committed Aug 17, 2015
1 parent a6de284 commit 8b61fad
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 9 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
<a name="1.0.0-alpha.6"></a>
# 1.0.0-alpha.6 (2015-08-17)


## Bug Fixes

- **NgTableParams:** table not reloaded when special `$` filter field changes
([8c287e91](https://github.com/esvit/ng-table/commit/8c287e9179aeaa1b646d0c6d7db5b8b1363f8963))


## Features

- **ngTableDefaultGetData:** set the `this` context of the filter function to the current NgTableParams
([e23ce330](https://github.com/esvit/ng-table/commit/e23ce330d385ae09d1b3840e52b6369a37948696))


<a name="1.0.0-alpha.5"></a>
# 1.0.0-alpha.5 (2015-08-16)

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-table",
"version": "1.0.0-alpha.5",
"version": "1.0.0-alpha.6",
"main": [
"./dist/ng-table.min.js",
"./dist/ng-table.min.css"
Expand Down
14 changes: 11 additions & 3 deletions dist/ng-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@
result = setPath(result, filter[key], key);
return result;
}, {});
return getFilterFn(params)(data, parsedFilter, params.settings().filterComparator);
var filterFn = getFilterFn(params);
return filterFn.call(params, data, parsedFilter, params.settings().filterComparator);
}

function getData(data, params) {
Expand Down Expand Up @@ -794,7 +795,7 @@
*/
this.isDataReloadRequired = function(){
// note: using != as want to treat null and undefined the same
return !isCommittedDataset || !angular.equals(params, committedParams);
return !isCommittedDataset || !angular.equals(params, committedParams) || hasGlobalSearchFieldChanges();
};

/**
Expand All @@ -815,9 +816,16 @@
* to be run so as to ensure the data presented to the user reflects these filters
*/
this.hasFilterChanges = function(){
return !angular.equals((params && params.filter), (committedParams && committedParams.filter));
return !angular.equals((params && params.filter), (committedParams && committedParams.filter)) ||
hasGlobalSearchFieldChanges();
};

function hasGlobalSearchFieldChanges(){
var currentVal = (params && params.filter && params.filter.$);
var previousVal = (committedParams && committedParams.filter && committedParams.filter.$);
return !angular.equals(currentVal, previousVal);
}

/**
* @ngdoc method
* @name NgTableParams#url
Expand Down
2 changes: 1 addition & 1 deletion dist/ng-table.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/ng-table.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ng-table.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-table",
"version": "1.0.0-alpha.5",
"version": "1.0.0-alpha.6",
"author": "Vitalii Savchuk <[email protected]>",
"license": "BSD",
"repository": {
Expand Down

0 comments on commit 8b61fad

Please sign in to comment.