Permalink
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...
1 parent b192b6c commit 1bcde68f03ad938137df0c38a032fd3842f70eea @mleibman mleibman committed Mar 11, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 slick.dataview.js
View
@@ -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;

0 comments on commit 1bcde68

Please sign in to comment.