mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
feat(custom-elements): add experimental custom elements build (#22863)
Co-authored-by: Liam DeBeasi <liamdebeasi@icloud.com>
This commit is contained in:
@ -4,7 +4,7 @@ test('virtual-scroll: basic', async () => {
|
||||
const page = await newE2EPage({
|
||||
url: '/src/components/virtual-scroll/test/basic?ionic:_testing=true'
|
||||
});
|
||||
await page.waitFor(300);
|
||||
await page.waitForTimeout(300);
|
||||
|
||||
const compare = await page.compareScreenshot();
|
||||
expect(compare).toMatchScreenshot();
|
||||
|
@ -4,7 +4,7 @@ test('virtual-scroll: cards', async () => {
|
||||
const page = await newE2EPage({
|
||||
url: '/src/components/virtual-scroll/test/cards?ionic:_testing=true'
|
||||
});
|
||||
await page.waitFor(300);
|
||||
await page.waitForTimeout(300);
|
||||
|
||||
const compare = await page.compareScreenshot();
|
||||
expect(compare).toMatchScreenshot();
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { Component, ComponentInterface, Element, FunctionalComponent, Host, Listen, Method, Prop, State, Watch, forceUpdate, h, readTask, writeTask } from '@stencil/core';
|
||||
|
||||
import { Cell, DomRenderFn, FooterHeightFn, HeaderFn, HeaderHeightFn, ItemHeightFn, ItemRenderFn, VirtualNode } from '../../interface';
|
||||
import { componentOnReady } from '../../utils/helpers';
|
||||
|
||||
import { CELL_TYPE_FOOTER, CELL_TYPE_HEADER, CELL_TYPE_ITEM } from './constants';
|
||||
import { Range, calcCells, calcHeightIndex, doRender, findCellIndex, getRange, getShouldUpdate, getViewport, inplaceUpdate, positionForIndex, resizeBuffer, updateVDom } from './virtual-scroll-utils';
|
||||
@ -322,8 +323,8 @@ export class VirtualScroll implements ComponentInterface {
|
||||
this.setCellHeight(cell, height);
|
||||
}
|
||||
};
|
||||
if (node && node.componentOnReady) {
|
||||
node.componentOnReady().then(update);
|
||||
if (node) {
|
||||
componentOnReady(node, update);
|
||||
} else {
|
||||
update();
|
||||
}
|
||||
|
Reference in New Issue
Block a user