Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ Changelog

_Note: Gaps between patch versions are faulty, broken or test releases._

## v4.0.0-beta.?? (2024-??-??)

#### :bug: Bug Fix

* Replaced `$refs.container` with `waitRef('container')`.

## v4.0.0-beta.146 (2024-10-18)

#### :bug: Bug Fix
Expand Down
6 changes: 6 additions & 0 deletions src/components/base/b-virtual-scroll-new/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ Changelog
> - :house: [Internal]
> - :nail_care: [Polish]

## v4.0.0-beta.?? (2024-??-??)

#### :bug: Bug Fix

* Replaced `$refs.container` with `waitRef('container')`.

## v4.0.0-beta.114 (2024-07-24)

#### :house: Internal
Expand Down
12 changes: 8 additions & 4 deletions src/components/base/b-virtual-scroll-new/b-virtual-scroll-new.ts
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ class bVirtualScrollNew extends iVirtualScrollProps implements iItems {

this.componentInternalState.setIsDomInsertInProgress(true);

this.async.requestAnimationFrame(() => {
this.async.requestAnimationFrame(async () => {
const
state = this.getVirtualScrollState();

Expand All @@ -515,7 +515,9 @@ class bVirtualScrollNew extends iVirtualScrollProps implements iItems {
this.slotsStateController.loadingProgressState();
}

this.$refs.container.appendChild(fragment);
const container = await this.waitRef<HTMLElement>('container');

container.appendChild(fragment);
this.componentInternalState.setIsDomInsertInProgress(false);

this.onDomInsertDone();
Expand All @@ -541,14 +543,16 @@ class bVirtualScrollNew extends iVirtualScrollProps implements iItems {

const asyncGroup = bVirtualScrollNewFirstChunkRenderAsyncGroup;

this.nextTick({label: $$.firstChunkRender, group: asyncGroup}).then(() => {
this.nextTick({label: $$.firstChunkRender, group: asyncGroup}).then(async () => {
this.componentInternalState.setIsDomInsertInProgress(false);

let itemsForMount: Array<MountedChild | MountedItem> = [];

if (!SSR) {
const container = await this.waitRef<HTMLElement>('container');

itemsForMount = this.componentFactory
.produceMounted(items, <HTMLElement[]>Array.from(this.$refs.container.children));
.produceMounted(items, <HTMLElement[]>Array.from(container.children));
}

this.observer.observe(itemsForMount);
Expand Down