ng-virtual-list 19.3.3-beta-1 → 19.3.3-beta-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -25,10 +25,10 @@ npm i ng-virtual-list
|
|
|
25
25
|
|
|
26
26
|
Template:
|
|
27
27
|
```html
|
|
28
|
-
<ng-virtual-list class="list" direction="
|
|
29
|
-
[itemRenderer]="
|
|
28
|
+
<ng-virtual-list class="list" direction="horizontal" [items]="horizontalItems" [itemsOffset]="50"
|
|
29
|
+
[itemRenderer]="horizontalItemRenderer" [itemSize]="64"></ng-virtual-list>
|
|
30
30
|
|
|
31
|
-
<ng-template #
|
|
31
|
+
<ng-template #horizontalItemRenderer let-data="data">
|
|
32
32
|
@if (data) {
|
|
33
33
|
<div class="list__h-container" (click)="onItemClick(data)">
|
|
34
34
|
<span>{{data.name}}</span>
|
|
@@ -63,7 +63,7 @@ export class AppComponent {
|
|
|
63
63
|
|
|
64
64
|
Template:
|
|
65
65
|
```html
|
|
66
|
-
<ng-virtual-list class="list" direction="
|
|
66
|
+
<ng-virtual-list class="list" direction="horizontal" [items]="horizontalGroupItems" [itemRenderer]="horizontalGroupItemRenderer"
|
|
67
67
|
[itemsOffset]="50" [stickyMap]="horizontalGroupItemsStickyMap" [itemSize]="54" [snap]="true"></ng-virtual-list>
|
|
68
68
|
|
|
69
69
|
<ng-template #horizontalGroupItemRenderer let-data="data">
|
package/lib/enums/direction.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ import { IVirtualListItem } from "./item.model";
|
|
|
5
5
|
* @author Evgenii Grebennikov
|
|
6
6
|
* @email djonnyx@gmail.com
|
|
7
7
|
*/
|
|
8
|
-
export interface IVirtualListCollection extends Array<IVirtualListItem
|
|
8
|
+
export interface IVirtualListCollection<E = Object> extends Array<IVirtualListItem<E>> {
|
|
9
9
|
}
|
|
@@ -5,10 +5,10 @@ import { Id } from "../types/id";
|
|
|
5
5
|
* @author Evgenii Grebennikov
|
|
6
6
|
* @email djonnyx@gmail.com
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export type IVirtualListItem<E = Object> = E & {
|
|
9
9
|
/**
|
|
10
10
|
* Unique identifier of the element.
|
|
11
11
|
*/
|
|
12
12
|
id: Id;
|
|
13
13
|
[x: string]: any;
|
|
14
|
-
}
|
|
14
|
+
};
|
|
@@ -37,7 +37,7 @@ export declare class NgVirtualListComponent implements AfterViewInit, OnInit, On
|
|
|
37
37
|
/**
|
|
38
38
|
* Collection of list items.
|
|
39
39
|
*/
|
|
40
|
-
items: import("@angular/core").InputSignal<IVirtualListCollection
|
|
40
|
+
items: import("@angular/core").InputSignal<IVirtualListCollection<Object>>;
|
|
41
41
|
/**
|
|
42
42
|
* Determines whether elements will snap. Default value is "true".
|
|
43
43
|
*/
|