From b8dc4e2dcd788e9197d3ea87781714948ad167fb Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Sun, 9 Feb 2025 12:17:41 +0200 Subject: [PATCH] collection maxSize option --- client/src/collection.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/src/collection.js b/client/src/collection.js index 373c76b0ab..956117f982 100644 --- a/client/src/collection.js +++ b/client/src/collection.js @@ -164,6 +164,7 @@ class Collection { * orderBy?: string|null, * urlRoot?: string, * url?: string, + * maxSize?: number, * }} [options] Options. */ constructor(models, options) { @@ -173,6 +174,10 @@ class Collection { this.model = options.model; } + if (options.maxSize !== undefined) { + this.maxSize = options.maxSize; + } + this._reset(); if (options.entityType) {