Gathering detailed insights and metrics for ng-virtual-table
Gathering detailed insights and metrics for ng-virtual-table
Gathering detailed insights and metrics for ng-virtual-table
Gathering detailed insights and metrics for ng-virtual-table
ng-table-virtual-scroll
Virtual scroll for for Angular Material Table
ng-cdk-table-virtual-scroll
Virtual scroll for for Angular Cdk Table
@craftworks/ng-table-virtual-scroll
Fork of Virtual scroll for for Angular Material Table: https://github.com/diprokon/ng-table-virtual-scroll
@dimkel/ng-cdk-table-virtual-scroll
Virtual scroll for for Angular Cdk Table
Angular 7/8 - virtual scroll table with support draggable, pagination, server side, sorting, filtering, resizing and dynamic component
npm install ng-virtual-table
Typescript
Module System
Node Version
NPM Version
TypeScript (90.77%)
CSS (5.14%)
HTML (3.85%)
HCL (0.23%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
37 Stars
159 Commits
6 Forks
4 Watchers
25 Branches
1 Contributors
Updated on May 18, 2024
Latest Version
2.0.0
Package Id
ng-virtual-table@2.0.0
Unpacked Size
502.47 kB
Size
118.42 kB
File Count
30
NPM Version
6.4.1
Node Version
10.15.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
36
Angular 7/8 virtual scroll table with support dynamic component, draggable, filtering, sorting, paginations, resizable and custom config for each column
Angular | ng-virtual-table | NPM package |
---|---|---|
8.x.x | 2.x.x | ng-virtual-table@^2.0.0 |
7.x.x | 1.x.x | ng-virtual-table@^1.0.0 |
1npm i ng-virtual-table 2yarn add ng-virtual-table
Make sure you have:
@angular/cdk
@angular/material
@angular/forms
1import { NgVirtualTableModule } from 'ng-virtual-table'; 2 3imports: [NgVirtualTableModule],
1<ng-virtual-table [dataSource]="dataSource"></ng-virtual-table>
📺 Demo
1 2 @Input() itemSize = 25; 3 4 @Input() dataSource: Observable<Array<VirtualTableItem | number | string | boolean>>; 5 6 @Input() filterPlaceholder = 'Filter'; 7 8 @Input() dataSetEmptyPlaceholder = 'Data is empty'; 9 10 @Input() config: VirtualTableConfig; 11 12 @Input() onRowClick: (item: VirtualTableItem) => void;
1export type sortColumn = 'asc' | 'desc' | null | false; 2 3 4export interface VirtualPageChange { 5 pageSize?: number; // pagination size 6 pageIndex?: number; // page index 7} 8 9export interface VirtualSortEffect { 10 sortColumn: string; // column for sort 11 sortType?: sortColumn; // type sort 12} 13 14export interface VirtualTableColumn { 15 name?: string; // Label for field, if absent will be use key 16 key: string; // Uniq key for filed, 17 func?: (item: VirtualTableItem) => any; // function for get value from dataSource item 18 comp?: (a: any, b: any) => number; // function for compare two item, depend from `func` function 19 sort?: 'asc' | 'desc' | null | false; // sort by default(support only one sort), false for disable 20 resizable?: boolean; // default true(if not set `true`) 21 draggable?: boolean; // default true (if not set `true`) 22 component?: VirtualTableColumnComponent | false; // default false (You class component must be part of entryComponents in yor Module!!!!!) 23} 24 25export interface VirtualTableColumnComponent { 26 componentConstructor: Type<any>; 27 inputs?: Object; // default {} 28 outputs?: Object; 29} 30 31export interface VirtualTablePaginator { 32 pageSize?: number; // default 10 33 pageSizeOptions?: Array<number>; // default [5, 10, 25, 100]; 34 showFirstLastButtons?: boolean; //default false; 35} 36 37export interface ResponseStreamWithSize { 38 stream: Array<any>; // stream for Server Side strategy 39 totalSize: number; // total size of stream 40} 41 42export interface VirtualTableEffect { 43 filter?: string; // filter string 44 sort?: VirtualSortEffect; // sort effect 45 pagination?: VirtualPageChange; // pagination effect 46} 47 48export interface VirtualTableConfig { 49 column?: Array<VirtualTableColumn>; // if config not provide will be auto generate column 50 header?: boolean; // default false 51 filter?: boolean; // default true 52 pagination?: VirtualTablePaginator | boolean; // default false 53 serverSide?: boolean; // default false; 54 serverSideResolver?: (effects: VirtualTableEffect) => Observable<ResponseStreamWithSize>; 55} 56 57
1import { VirtualTableConfig } from 'ng-virtual-table'; 2 3 clickToItem(item: any) { 4 console.log(item); 5 } 6 7 dataSource = of( 8 Array(1000).fill(0).map((e) => ({ 9 name: Math.random().toString(36).substring(7), 10 age: Math.round(Math.random() * 1000), 11 })), 12 ); 13 14 dataSource1 = of( 15 Array(1000).fill(0).map((e) => ({ 16 name: Math.random().toString(36).substring(7), 17 age: Math.round(Math.random() * 1000), 18 age2: Math.round(Math.random() * 1000), 19 label: { 20 type: Math.random().toString(36).substring(7), 21 }, 22 })), 23 ); 24 25 config: VirtualTableConfig = { 26 column: [ 27 { 28 key: 'name', 29 name: 'Full name', 30 sort: false // disable sort 31 }, 32 { 33 key: 'age', 34 name: 'Full Age', 35 sort: 'desc', // pre defined sort 36 component: { 37 componentConstructor: InfoComponent, 38 inputs: { 39 title: (e) => e.age, 40 }, 41 }, 42 }, 43 { 44 key: 'label', 45 name: 'Full Label', 46 func: (e) => e.label.type, 47 comp: (a, b) => a.indexOf('5') - b.indexOf('5'), // here a and b (e) => e.label.type 48 }, 49 ], 50 }; 51 52 53 54@Component({ 55 selector: 'app-info', 56 templateUrl: './info.component.html', 57 styleUrls: ['./info.component.scss'], 58}) 59export class InfoComponent { 60 @Input() title: string; 61 62 constructor() {} 63} 64
1<ng-virtual-table [dataSource]="dataSource"></ng-virtual-table> 2 3<ng-virtual-table [dataSource]="dataSource1" [onRowClick]="clickToItem" [config]="config"></ng-virtual-table>
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
93 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More