Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed example pages using DataView.

DataView now lazy-inits the GroupItemMetadataProvider only when grouping is performed, so no need to include its .js file if grouping isn't needed.
  • Loading branch information...
commit 1bcde68f03ad938137df0c38a032fd3842f70eea 1 parent b192b6c
@mleibman mleibman authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 slick.dataview.js
View
6 slick.dataview.js
@@ -23,7 +23,7 @@
var self = this;
var defaults = {
- groupItemMetadataProvider: new Slick.Data.GroupItemMetadataProvider()
+ groupItemMetadataProvider: null
};
@@ -155,6 +155,10 @@
}
function groupBy(valueGetter, valueFormatter, sortComparer) {
+ if (!options.groupItemMetadataProvider) {
+ options.groupItemMetadataProvider = new Slick.Data.GroupItemMetadataProvider();
+ }
+
groupingGetter = valueGetter;
groupingGetterIsAFn = typeof groupingGetter === "function";
groupingFormatter = valueFormatter;
Please sign in to comment.
Something went wrong with that request. Please try again.