1.8.0 • Published 13 days ago

ag-virtual-scroll v1.8.0

Weekly downloads
29
License
-
Repository
-
Last release
13 days ago

ag-virtual-scroll (Angular 17+)

Angular Component of virtual-scroll. It easy to use and works light and clean. He also work with differents items height.

Use example (more examples).

<ag-virtual-scroll #vs [items]="items" height="350px" min-row-height="50" class="box-border">
    <div class="demo-item" *ngFor="let item of vs.items">
        <div>
            <span>{{item.id}}</span>
        </div>
        <div>
            <strong>{{item.name}}</strong><br/>
            {{item.price | currency}}
        </div>
    </div>
</ag-virtual-scroll>

npm.io

⚠️Important⚠️

  • Always wrap the repeat element with a div or ag-vs-item, per example: <div *ngFor="let item of vs.items">...you structure of content...</div>.
  • Define a min-row-height to increase virtualization performance.
  • Always define a height because it will be the one that will do the virtualization of the items.
  • Inform your all data list in [items].
  • Add #vs to use in iteration *ngFor.

Usage

Install

npm install ag-virtual-scroll

Import into Module

import { AgVirtualScrollModule } from 'ag-virtual-scroll';

@NgModule({
  imports: [
    ...,
    AgVirtualScrollModule
  ],
  declarations: [...],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

API

Inputs/Outputs (Required)

NameTypeDescription
itemsany[]Your all data list stay here.

Inputs/Outputs (Optional)

NameTypeDefaultDescription
min-row-heightnumber40This determine how minimm height each item will have.
heightstring'auto'Define a fixed height for container to make a virtual-scroll of items.
onItemsRenderEventEmitter<AgVsRenderEvent<T>>noneDefine a max width to container.
1.8.0

13 days ago

1.7.0

4 months ago

1.6.3

6 months ago

1.6.2

6 months ago

1.6.1

6 months ago

1.6.0

1 year ago

1.5.2

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0

4 years ago

1.1.3

4 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago