Skip to content

Commit

Permalink
create new version
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzofox3 committed Nov 15, 2015
1 parent da1225b commit 5bb9aa0
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 12 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-smart-table",
"version": "2.1.4",
"version": "2.1.5",
"homepage": "https://github.com/lorenzofox3/Smart-Table",
"authors": [
"lorenzofox3 <[email protected]>"
Expand Down
9 changes: 8 additions & 1 deletion changeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,11 @@ function(tableState, tableController){
## version 2.1.4

* add throttle to sort
* add watch to first item in collection (@matthewbednarski)
* add watch to first item in collection (@matthewbednarski)

## version 2.1.5

* #544
* #533
* #515

13 changes: 10 additions & 3 deletions dist/smart-table.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @version 2.1.4
* @version 2.1.5
* @license MIT
*/
(function (ng, undefined){
Expand Down Expand Up @@ -88,10 +88,17 @@ ng.module('smart-table')

if ($attrs.stSafeSrc) {
safeGetter = $parse($attrs.stSafeSrc);
$scope.$watch(function () {
var safeSrc = safeGetter($scope);
return safeSrc && safeSrc.length ? safeSrc[0] : undefined;
}, function (newValue, oldValue) {
if (newValue !== oldValue) {
updateSafeCopy();
}
});
$scope.$watch(function () {
var safeSrc = safeGetter($scope);
return safeSrc ? safeSrc.length : 0;

}, function (newValue, oldValue) {
if (newValue !== safeCopy.length) {
updateSafeCopy();
Expand Down Expand Up @@ -362,7 +369,7 @@ ng.module('smart-table')
$timeout.cancel(promise);
}
if (throttle < 0) {
func();
scope.$apply(func);
} else {
promise = $timeout(func, throttle);
}
Expand Down
6 changes: 3 additions & 3 deletions dist/smart-table.min.js

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

2 changes: 1 addition & 1 deletion dist/smart-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": "angular-smart-table",
"version": "2.1.4",
"version": "2.1.5",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/stSort.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ng.module('smart-table')
$timeout.cancel(promise);
}
if (throttle < 0) {
func();
scope.$apply(func);
} else {
promise = $timeout(func, throttle);
}
Expand Down
9 changes: 8 additions & 1 deletion src/stTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,17 @@ ng.module('smart-table')

if ($attrs.stSafeSrc) {
safeGetter = $parse($attrs.stSafeSrc);
$scope.$watch(function () {
var safeSrc = safeGetter($scope);
return safeSrc && safeSrc.length ? safeSrc[0] : undefined;
}, function (newValue, oldValue) {
if (newValue !== oldValue) {
updateSafeCopy();
}
});
$scope.$watch(function () {
var safeSrc = safeGetter($scope);
return safeSrc ? safeSrc.length : 0;

}, function (newValue, oldValue) {
if (newValue !== safeCopy.length) {
updateSafeCopy();
Expand Down

0 comments on commit 5bb9aa0

Please sign in to comment.