File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export class QueryService<T> {
1111 http : AxiosInstance ;
1212 meta : MetaService ;
1313 records = [ ] ;
14- parameters : { fields ; orderBy ?: string [ ] ; start : number ; count : number ; where ?: string ; layout ?: string ; sort ?; query ?} = {
14+ parameters : { fields ; orderBy ?: string [ ] ; start : number ; count : number ; where ?: string ; layout ?: string ; sort ?; query ?; showTotalMatched ?: boolean } = {
1515 fields : [ 'id' ] ,
1616 orderBy : [ '-dateAdded' ] ,
1717 start : 0 ,
@@ -127,6 +127,9 @@ export class QueryService<T> {
127127
128128 private shouldPullMoreRecords ( { count = 0 , start = 0 , total = 0 } ) {
129129 const [ nextStart , nextCount ] = this . getNext ( start , count ) ;
130+ if ( ! this . parameters . showTotalMatched ) {
131+ return ( count === 0 ) ? false : ( nextCount > 0 ) ;
132+ }
130133 return ( nextStart < total && count !== 0 ) ? nextCount : 0 ;
131134 }
132135
You can’t perform that action at this time.
0 commit comments