Skip to content

Commit 290ae74

Browse files
Zhuk, AlexanderZhuk, Alexander
authored andcommitted
multiple grids example texts
1 parent e528a95 commit 290ae74

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

README.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Demo 100k: http://angular-data-grid.github.io/demo/100k/
1313
- Easily switch between the most popular Bootstrap and Google Material theming, or apply your own CSS theme just by changing several CSS classes.
1414
- Built-in sync with browser address bar (URL), so you can copy-n-paste sorting/filtering/pagination results URL and open it in other browser / send to anyone - even if pagination / filtering are done on a client-side.
1515
- Unlike most part of other Angular DataGrids, we intentionally use non-isolated scope of the directive to maximize flexibility, so it can be easily synchronized with any data changes inside your controller.
16-
NOTE! With great power comes great responsibility, so use non-isolated API carefully.
16+
NOTE! With great power comes great responsibility, so use non-isolated API wisely.
1717

1818
### Installation
1919

@@ -80,14 +80,6 @@ angular.module('myApp', ['dataGrid', 'pagination'])
8080
sort: {
8181
predicate: 'companyName',
8282
direction: 'asc'
83-
},
84-
//optional parameter - custom rules for filters (see explanation below)
85-
customFilters: {
86-
startFrom: function (items, value, predicate) {
87-
return items.filter(function (item) {
88-
return value && item[predicate] ? !item[predicate].toLowerCase().indexOf(value.toLowerCase()) : true;
89-
});
90-
}
9183
}
9284
};
9385
```
@@ -234,4 +226,4 @@ Then create in `gridOptions.customFilters` variable named as `ng-model` with fil
234226
### Others
235227
All filters have optional parameter `disable-url`. If you set it to **true**, URL-synchronization for this filter will be disabled.
236228
237-
If you need to use 2 or more grids on page, please add id to grids, and then use ```grid-id``` attribute on filters to specify their corresponding grid.
229+
If you need to use 2 or more grids on page, please add id to grids, and then use ```grid-id``` attribute on filters to specify their corresponding grid. [example](http://angular-data-grid.github.io/demo/bootstrap/multiple.html)

demo/bootstrap/multiple.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
<div class="container">
2121
<div>
2222
<h3>Angular Data Grid - Multiple Grids Example</h3>
23-
Do not forget to assign <code>id</code> attribute for each grid instance on a page to make them work simultaneously. Otherwise grids will share sorting and filtering actions.<br>
23+
You need to assign <code>id</code> attribute for each grid instance on a page to make them work simultaneously. If you use external filtering, assign <code>grid-id</code> to id and <code>ng-change</code> to associated
24+
<code>gridActions</code> (see example below).
2425
<a href="https://github.com/angular-data-grid/angular-data-grid.github.io" target="_blank">Project GitHub</a>
2526
</div>
2627
<hr>

0 commit comments

Comments
 (0)