@etsoo/materialui 1.0.77 → 1.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/ListMoreDisplay.d.ts
CHANGED
|
@@ -6,6 +6,10 @@ import { GridData, GridLoader } from '@etsoo/react';
|
|
|
6
6
|
* ListMoreDisplay props
|
|
7
7
|
*/
|
|
8
8
|
export interface ListMoreDisplayProps<T extends object, F extends DataTypes.BasicTemplate = DataTypes.BasicTemplate> extends Omit<CardProps, 'children'>, GridLoader<T> {
|
|
9
|
+
/**
|
|
10
|
+
* Batch size to load
|
|
11
|
+
*/
|
|
12
|
+
batchSize?: number;
|
|
9
13
|
/**
|
|
10
14
|
* Children to display the list
|
|
11
15
|
*/
|
package/lib/ListMoreDisplay.js
CHANGED
|
@@ -10,7 +10,7 @@ import { globalApp } from './app/ReactApp';
|
|
|
10
10
|
*/
|
|
11
11
|
export function ListMoreDisplay(props) {
|
|
12
12
|
// Destruct
|
|
13
|
-
const { children, defaultOrderBy, headerRenderer, autoLoad = headerRenderer == null, headerTitle, loadBatchSize, loadData, moreLabel = typeof globalApp === 'undefined'
|
|
13
|
+
const { batchSize = 6, children, defaultOrderBy, headerRenderer, autoLoad = headerRenderer == null, headerTitle, loadBatchSize, loadData, moreLabel = typeof globalApp === 'undefined'
|
|
14
14
|
? undefined
|
|
15
15
|
: globalApp.get('more') + '...', fieldTemplate, threshold, ...rest } = props;
|
|
16
16
|
// Refs
|
|
@@ -20,7 +20,7 @@ export function ListMoreDisplay(props) {
|
|
|
20
20
|
hasNextPage: true,
|
|
21
21
|
isNextPageLoading: false,
|
|
22
22
|
orderBy: defaultOrderBy,
|
|
23
|
-
batchSize
|
|
23
|
+
batchSize,
|
|
24
24
|
loadedItems: 0,
|
|
25
25
|
selectedItems: [],
|
|
26
26
|
idCache: {}
|
package/package.json
CHANGED
package/src/ListMoreDisplay.tsx
CHANGED
|
@@ -26,6 +26,11 @@ export interface ListMoreDisplayProps<
|
|
|
26
26
|
F extends DataTypes.BasicTemplate = DataTypes.BasicTemplate
|
|
27
27
|
> extends Omit<CardProps, 'children'>,
|
|
28
28
|
GridLoader<T> {
|
|
29
|
+
/**
|
|
30
|
+
* Batch size to load
|
|
31
|
+
*/
|
|
32
|
+
batchSize?: number;
|
|
33
|
+
|
|
29
34
|
/**
|
|
30
35
|
* Children to display the list
|
|
31
36
|
*/
|
|
@@ -68,6 +73,7 @@ export function ListMoreDisplay<
|
|
|
68
73
|
>(props: ListMoreDisplayProps<T, F>) {
|
|
69
74
|
// Destruct
|
|
70
75
|
const {
|
|
76
|
+
batchSize = 6,
|
|
71
77
|
children,
|
|
72
78
|
defaultOrderBy,
|
|
73
79
|
headerRenderer,
|
|
@@ -90,7 +96,7 @@ export function ListMoreDisplay<
|
|
|
90
96
|
hasNextPage: true,
|
|
91
97
|
isNextPageLoading: false,
|
|
92
98
|
orderBy: defaultOrderBy,
|
|
93
|
-
batchSize
|
|
99
|
+
batchSize,
|
|
94
100
|
loadedItems: 0,
|
|
95
101
|
selectedItems: [],
|
|
96
102
|
idCache: {}
|