You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* renderBatch tells how many groups are calculated in one step and rendered. This is useful for large time tables, where the rendering takes a long time.
197
-
* @default10
197
+
* @default1
198
198
*/
199
199
renderBatch?: number
200
200
}
@@ -217,7 +217,7 @@ export default function LPTimeTable<
217
217
)
218
218
}
219
219
220
-
exportlettimeTableGroupRenderBatchSize=10
220
+
exportlettimeTableGroupRenderBatchSize=1
221
221
222
222
/**
223
223
* The LPTimeTable depends on the localization messages. It needs to be wrapped in an
* The idleRateLimitHelper returns a function, which you can call to execute a callback function.
5
+
* However, the callback function will only be executed if the time elapsed since the last call is greater than the specified minimum distance and by using the requestIdleCallback function of the browser.
6
+
* @param minDistanceMS the minimal elapsed time between two calls.
7
+
* @param executeAfter if true, the callback will be executed using a timeout after the minimum distance has passed, to make sure it is executed.
8
+
* @returns a function that takes a callback function as a parameter.
9
+
*/
10
+
exportfunctionidleRateLimitHelper(
11
+
timeoutMS: number|undefined,
12
+
executeAfter=true,
13
+
){
14
+
letlastTime=0
15
+
lettimeoutRunning=0
16
+
if(timeoutMS!==undefined&&timeoutMS<=0){
17
+
thrownewError("minDistanceMS must be positive and above 0")
0 commit comments