Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const nativeIG = this.$_nativeInfiniteGrid;
const items = this.$_toItems();
let visibleChildren: VNode[] = [];
if (nativeIG) {
const result = nativeIG.beforeSync(items.filter(val => !val.isLoading));
this.$_layout = result === "relayout"
? result
: (this.$_layout || result);
visibleChildren = nativeIG.getRenderingItems().map(item => item.vnode);
if (this.$slots.loading && nativeIG.isLoading()) {
visibleChildren.push(...this.$slots.loading);
}
} else {
const groups = categorize(items);
if (this.status) {
const { startCursor, endCursor } = this.status._infinite;
visibleChildren = ItemManager.pluck(
groups.slice(startCursor, endCursor + 1),
"items",
).map((item: IItem) => item.vnode);
} else if (this.useFirstRender && groups[0]) {
visibleChildren = groups[0].items.map((item: IItem) => item.vnode);
}
}
// To bypass
// [Vue warn]: Avoid using observed data object as vnode data: {}
const wrapperData = {};
for (const key in this.wrapperData) {