File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
packages/component-base/src/data-provider-controller Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -226,14 +226,25 @@ export class DataProviderController extends EventTarget {
226226 this . #loadCachePage( this . rootCache , 0 ) ;
227227 }
228228
229+ /**
230+ * Override to prevent loading of the cache page under certain conditions.
231+ *
232+ * @param {Cache } cache
233+ * @param {number } page
234+ * @protected
235+ */
236+ _shouldLoadCachePage ( _cache , _page ) {
237+ return true ;
238+ }
239+
229240 /** @private */
230241 #createRootCache( size ) {
231242 return new Cache ( this . #cacheContext, this . pageSize , size ) ;
232243 }
233244
234245 /** @private */
235246 #loadCachePage( cache , page ) {
236- if ( ! this . dataProvider || cache . pendingRequests [ page ] ) {
247+ if ( ! this . dataProvider || cache . pendingRequests [ page ] || ! this . _shouldLoadCachePage ( cache , page ) ) {
237248 return ;
238249 }
239250
You can’t perform that action at this time.
0 commit comments