angular-smart-table
Advanced tools
Comparing version 2.1.9 to 2.1.10
@@ -375,2 +375,11 @@ /** | ||
// set aria attributes | ||
var ariaSort = 'aria-sort'; | ||
var ariaSortNone = 'none'; | ||
var ariaSortAscending = 'ascending'; | ||
var ariaSortDescending = 'descending'; | ||
element | ||
.attr('role', 'columnheader') | ||
.attr(ariaSort, ariaSortNone); | ||
if (attr.stSortDefault) { | ||
@@ -430,3 +439,4 @@ sortDefault = scope.$eval(attr.stSortDefault) !== undefined ? scope.$eval(attr.stSortDefault) : attr.stSortDefault; | ||
.removeClass(classAscent) | ||
.removeClass(classDescent); | ||
.removeClass(classDescent) | ||
.attr(ariaSort, ariaSortNone); | ||
} else { | ||
@@ -436,3 +446,4 @@ index = newValue.reverse === true ? 2 : 1; | ||
.removeClass(stateClasses[index % 2]) | ||
.addClass(stateClasses[index - 1]); | ||
.addClass(stateClasses[index - 1]) | ||
.attr(ariaSort, newValue.reverse ? ariaSortDescending : ariaSortAscending); | ||
} | ||
@@ -439,0 +450,0 @@ }, true); |
{ | ||
"name": "angular-smart-table", | ||
"version": "2.1.9", | ||
"version": "2.1.10", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -10,3 +10,4 @@ ng.module('smart-table') | ||
delay: 400, // ms | ||
inputEvent: 'input' | ||
inputEvent: 'input', | ||
trimSearch: false | ||
}, | ||
@@ -13,0 +14,0 @@ select: { |
@@ -10,2 +10,3 @@ ng.module('smart-table') | ||
var event = attr.stInputEvent || stConfig.search.inputEvent; | ||
var trimSearch = attr.trimSearch || stConfig.search.trimSearch; | ||
@@ -16,2 +17,3 @@ attr.$observe('stSearch', function (newValue, oldValue) { | ||
ctrl.tableState().search = {}; | ||
input = ng.isString(input) && trimSearch ? input.trim() : input; | ||
tableCtrl.search(input, newValue); | ||
@@ -39,3 +41,5 @@ } | ||
promise = $timeout(function () { | ||
tableCtrl.search(evt.target.value, attr.stSearch || ''); | ||
var input = evt.target.value; | ||
input = ng.isString(input) && trimSearch ? input.trim() : input; | ||
tableCtrl.search(input, attr.stSearch || ''); | ||
promise = null; | ||
@@ -42,0 +46,0 @@ }, throttle); |
@@ -20,2 +20,11 @@ ng.module('smart-table') | ||
// set aria attributes | ||
var ariaSort = 'aria-sort'; | ||
var ariaSortNone = 'none'; | ||
var ariaSortAscending = 'ascending'; | ||
var ariaSortDescending = 'descending'; | ||
element | ||
.attr('role', 'columnheader') | ||
.attr(ariaSort, ariaSortNone); | ||
if (attr.stSortDefault) { | ||
@@ -75,3 +84,4 @@ sortDefault = scope.$eval(attr.stSortDefault) !== undefined ? scope.$eval(attr.stSortDefault) : attr.stSortDefault; | ||
.removeClass(classAscent) | ||
.removeClass(classDescent); | ||
.removeClass(classDescent) | ||
.attr(ariaSort, ariaSortNone); | ||
} else { | ||
@@ -81,3 +91,4 @@ index = newValue.reverse === true ? 2 : 1; | ||
.removeClass(stateClasses[index % 2]) | ||
.addClass(stateClasses[index - 1]); | ||
.addClass(stateClasses[index - 1]) | ||
.attr(ariaSort, newValue.reverse ? ariaSortAscending : ariaSortDescending); | ||
} | ||
@@ -84,0 +95,0 @@ }, true); |
@@ -116,3 +116,2 @@ ng.module('smart-table').controller('stTableController', [ | ||
input = ng.isString(input) ? input.trim() : input; | ||
$parse(prop).assign(predicateObject, input); | ||
@@ -119,0 +118,0 @@ // to avoid to filter out null value |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
263164
31
2941
0