Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed search filter from grouping example to simplify it a bit (plu…

…s it wasn't working).
  • Loading branch information...
commit 1fb360faa18259d6f88dcf879af69869391fbf0c 1 parent a6b96d1
@mleibman authored
Showing with 3 additions and 24 deletions.
  1. +3 −24 examples/example-grouping.html
View
27 examples/example-grouping.html
@@ -37,9 +37,6 @@
<div style="padding:2px;">
<div style="width:100px;display:inline-block;" id="pcSlider"></div>
</div>
- <br/>
- <label style="width:200px;float:left">And title including:</label>
- <input type=text id="txtSearch" style="width:100px;">
<br/><br/>
<hr/>
<button onclick="clearGrouping()">Clear grouping</button>
@@ -111,15 +108,13 @@
var sortdir = 1;
var percentCompleteThreshold = 0;
var prevPercentCompleteThreshold = 0;
-var searchString = "";
function avgTotalsFormatter(totals, columnDef) {
return "avg: " + Math.round(totals.avg[columnDef.field]) + "%";
}
function myFilter(item, args) {
- return item["percentComplete"] >= args.percentComplete &&
- (args.searchString == "" || item["title"].indexOf(args.searchString) == -1);
+ return item["percentComplete"] >= args.percentComplete;
}
function percentCompleteSort(a, b) {
@@ -293,28 +288,13 @@
});
- // wire up the search textbox to apply the filter to the model
- $("#txtSearch,#txtSearch2").keyup(function (e) {
- Slick.GlobalEditorLock.cancelCurrentEdit();
-
- // clear on Esc
- if (e.which == 27) {
- this.value = "";
- }
-
- searchString = this.value;
- dataView.refresh();
- });
-
-
function filterAndUpdate() {
var isNarrowing = percentCompleteThreshold > prevPercentCompleteThreshold;
var isExpanding = percentCompleteThreshold < prevPercentCompleteThreshold;
var renderedRange = grid.getRenderedRange();
dataView.setFilterArgs({
- percentComplete: percentCompleteThreshold,
- searchString: searchString
+ percentComplete: percentCompleteThreshold
});
dataView.setRefreshHints({
ignoreDiffsBefore: renderedRange.top,
@@ -332,8 +312,7 @@
dataView.setItems(data);
dataView.setFilter(myFilter);
dataView.setFilterArgs({
- percentComplete: percentCompleteThreshold,
- searchString: searchString
+ percentComplete: percentCompleteThreshold
});
dataView.groupBy(
"duration",
Please sign in to comment.
Something went wrong with that request. Please try again.