diff --git a/packages/kanban/src/components/KanbanRow.svelte b/packages/kanban/src/components/KanbanRow.svelte
index 40a750fa08..d6766fefaf 100644
--- a/packages/kanban/src/components/KanbanRow.svelte
+++ b/packages/kanban/src/components/KanbanRow.svelte
@@ -57,18 +57,22 @@
let limitedObjects: DocWithRank[] = []
let loading = false
+ let loadingTimeout: any | undefined = undefined
- function nop (op: () => void, timeout: number) {
- op()
- }
-
- $: {
- loading = true
- ;(limitedObjects.length > 0 ? nop : setTimeout)(() => {
+ function update (stateObjects: Item[], limit: number | undefined, index: number): void {
+ clearTimeout(loadingTimeout)
+ if (limitedObjects.length > 0 || index * 2 === 0) {
limitedObjects = stateObjects.slice(0, limit)
- loading = false
- }, index * 2)
+ } else {
+ loading = true
+ loadingTimeout = setTimeout(() => {
+ limitedObjects = stateObjects.slice(0, limit)
+ loading = false
+ }, index * 2)
+ }
}
+
+ $: update(stateObjects, limit, index)
{#each limitedObjects as object, i (object._id)}
diff --git a/packages/presentation/src/components/MessageBox.svelte b/packages/presentation/src/components/MessageBox.svelte
index 753fed0024..f46919033d 100644
--- a/packages/presentation/src/components/MessageBox.svelte
+++ b/packages/presentation/src/components/MessageBox.svelte
@@ -14,8 +14,8 @@
-->
+