We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ac1680d commit 45cfac7Copy full SHA for 45cfac7
1 file changed
docs/examples.html
@@ -272,12 +272,18 @@ <h1>Loading remote data</h1>
272
page: params.page
273
};
274
},
275
- processResults: function (data, page) {
276
- // parse the results into the format expected by Select2.
+ processResults: function (data, params) {
+ // parse the results into the format expected by Select2
277
// since we are using custom formatting functions we do not need to
278
- // alter the remote JSON data
+ // alter the remote JSON data, except to indicate that infinite
279
+ // scrolling can be used
280
+ params.page = params.page || 1;
281
+
282
return {
- results: data.items
283
+ results: data.items,
284
+ pagination: {
285
+ more: (params.page * 30) < data.total_count
286
+ }
287
288
289
cache: true
0 commit comments