-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
area: material/tabstroubleshootingThis issue is not reporting an issue, but just asking for helpThis issue is not reporting an issue, but just asking for help
Description
What are you trying to do?
Add virtual scrolling component into my component library (Storybook)
What troubleshooting steps have you tried?
I tried complete removing of node_modules and reinstallation
Component is not present in Storybook, but if i try it in application itselt - it works fine
It appears both in View Engine and Ivy mode for my library
Reproduction
- Create component with ScrollingModule
- Create Storybook story with that component
- Observe console and component on canvas
ER: Component is present on canvas, no errors in console
AR: Canvas is empty, error in consol
Component template
<cdk-virtual-scroll-viewport
[itemSize]="50"
[style.height]="'200px'">
<div *cdkVirtualFor="let item of [1,2,3,4,5,6,7,8,9]"
[style.height]="'50px'">
{{ item }}
</div>
</cdk-virtual-scroll-viewport>
Module itself
@NgModule({
declarations: [VirtualScrollComponent],
imports: [
CommonModule,
ScrollingModule,
],
exports: [VirtualScrollComponent],
})
export class VirtualScrollModule {
}
Storybook story
export default {
title: 'Components/Virtual Scroll',
decorators: [
withKnobs,
moduleMetadata({
imports: [VirtualScrollModule],
}),
],
};
export const Default = () => ({
template: `
<app-virtual-scroll
[items]="items"
[itemSize]="itemSize"
[itemTemplate]="itemTemplate"
[viewportHeight]="viewportHeight">
</app-virtual-scroll>
`,
props: {
itemSize: number('Item size', 50),
viewportHeight: number('Viewport height', 300),
items,
},
});
Environment
- Angular: 11.2.14
- CDK/Material: 11.2.13
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): macOS
Metadata
Metadata
Assignees
Labels
area: material/tabstroubleshootingThis issue is not reporting an issue, but just asking for helpThis issue is not reporting an issue, but just asking for help
