Set config.maxrecs only if it's not already set.
authorMike Taylor <mike@indexdata.com>
Thu, 3 Apr 2014 15:51:54 +0000 (16:51 +0100)
committerMike Taylor <mike@indexdata.com>
Thu, 3 Apr 2014 15:51:54 +0000 (16:51 +0100)
This allows the default to be overridden by the application.

src/mkws-widget-record.js

index 5f333e0..4d4031c 100644 (file)
@@ -1,4 +1,4 @@
 mkws.registerWidgetType('Record', function() {
     mkws.promotionFunction('Records').call(this);
-    this.config.maxrecs = 1;
+    if (!this.config.maxrecs) this.config.maxrecs = 1;
 });