diff --git a/CHANGELOG.md b/CHANGELOG.md index 5549628d2..abab49bba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## v1.0.0-122 + + +### 🩹 Fixes + +- Fix calendar virtual list ([9c1f422](https://github.com/undb-io/undb/commit/9c1f422)) + +### ❤️ Contributors + +- Nichenqin ([@nichenqin](http://github.com/nichenqin)) + ## v1.0.0-121 diff --git a/apps/frontend/src/lib/components/blocks/calendar-view/calendar-view-month-records.svelte b/apps/frontend/src/lib/components/blocks/calendar-view/calendar-view-month-records.svelte index 32bc2bb04..5f7bc5d66 100644 --- a/apps/frontend/src/lib/components/blocks/calendar-view/calendar-view-month-records.svelte +++ b/apps/frontend/src/lib/components/blocks/calendar-view/calendar-view-month-records.svelte @@ -118,6 +118,7 @@ $: records = Records.fromJSON($t, rs) let virtualListEl: HTMLDivElement + let virtualItemEls: HTMLDivElement[] = [] $: color = $viewId ? $t.views.getViewById($viewId)?.color.into(undefined) : undefined @@ -127,6 +128,14 @@ estimateSize: () => 60, overscan: 5, }) + + $: items = $virtualizer.getVirtualItems() + + $: { + if (virtualItemEls.length) { + virtualItemEls.forEach((el) => $virtualizer.measureElement(el)) + } + }