Auto-search uses perpage configuration item.
authorMike Taylor <mike@indexdata.com>
Tue, 1 Apr 2014 15:12:38 +0000 (16:12 +0100)
committerMike Taylor <mike@indexdata.com>
Tue, 1 Apr 2014 15:12:53 +0000 (16:12 +0100)
src/mkws-widgets.js

index 19789bd..da20ce5 100644 (file)
@@ -287,13 +287,15 @@ mkws.registerWidgetType('Records', function() {
 
        this.team.queue("ready").subscribe(function() {
            var sortOrder = that.config.sort;
+           var perpage = that.config.perpage;
            var targets = that.config.targets;
            var s = "running auto search: '" + query + "'";
            if (sortOrder) s += " sorted by '" + sortOrder + "'";
+           if (perpage) s += " with " + perpage + " per page";
            if (targets) s += " in targets '" + targets + "'";
            that.log(s);
 
-           that.team.newSearch(query, sortOrder, targets);
+           that.team.newSearch(query, sortOrder, perpage, targets);
        });
     }
 });