From dc6237e77c962d799dccfd9f937b991422247be1 Mon Sep 17 00:00:00 2001 From: Stephen James Date: Mon, 6 Apr 2015 21:33:23 -0400 Subject: [PATCH] Document dataSourceOptions, preserveDataSourceOptions --- _includes/js/repeater.html | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/_includes/js/repeater.html b/_includes/js/repeater.html index ec6e61f36..d7e54a589 100644 --- a/_includes/js/repeater.html +++ b/_includes/js/repeater.html @@ -261,6 +261,12 @@

Options

function. Run the callback function once you gather the appropriate information to complete the rendering. Review more details on using dataSource below. + + dataSourceOptions + object + null + Use this object to pass a parameter to a custom-defined dataSource function mentioned above. Then, use those values to customize the data that gets passed back into the repeater from your API. Suggested uses include sorting, filtering, and search values. This object is also valuable in custom renders when used as an object within the render methods's options parameter. Did you lose your custom dataSourceOptions when you changed the page? If you did, set preserveDataSourceOptions to true in order to keep them. + defaultView string or number @@ -277,6 +283,12 @@

Options

Specifies the number of items allowed within the .repeater-primaryPaging drop-down menu. If the number of pages exceeds this amount, the code will use the .repeater-secondaryPaging input. + + preserveDataSourceOptions + boolean + false + Sets whether defineddataSourceOptions get preserved or reset when the dataSource is called. For example, the dataSource function is called when navigating to another page. If you would like to keep previously defined settings such as search or filtering, then set to true. Setting to true is generally recommended when using dataSourceOptions to manipulate your data. + staticHeight boolean or number @@ -443,7 +455,7 @@

Methods

Data Source

Call the dataSource function prior to rendering data for the current view. Receives an options object and callback function as arguments. The options object - provides context for which data should return. Use the callback to continue onward + provides context for which data should return. Please review the dataSourceOptions option if the datasource needs to be manipulated (such as for a custom render, to search, to sort, or to filter). Use the callback to continue onward with rendering.