ng-virtual-list 16.4.0 → 16.4.1
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 +9 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -414,22 +414,22 @@ List items are encapsulated in shadowDOM, so to override default styles you need
|
|
|
414
414
|
|
|
415
415
|
## API
|
|
416
416
|
|
|
417
|
-
[NgVirtualListComponent](https://github.com/DjonnyX/ng-virtual-list/blob/
|
|
417
|
+
[NgVirtualListComponent](https://github.com/DjonnyX/ng-virtual-list/blob/16.x/projects/ng-virtual-list/src/lib/ng-virtual-list.component.ts)
|
|
418
418
|
|
|
419
419
|
Inputs
|
|
420
420
|
|
|
421
421
|
| Property | Type | Description |
|
|
422
422
|
|---|---|---|
|
|
423
423
|
| id | number | Readonly. Returns the unique identifier of the component. |
|
|
424
|
-
| items | [IVirtualListCollection](https://github.com/DjonnyX/ng-virtual-list/blob/
|
|
424
|
+
| items | [IVirtualListCollection](https://github.com/DjonnyX/ng-virtual-list/blob/16.x/projects/ng-virtual-list/src/lib/models/collection.model.ts) | Collection of list items. The collection of elements must be immutable. |
|
|
425
425
|
| itemSize | number? = 24 | If direction = 'vertical', then the height of a typical element. If direction = 'horizontal', then the width of a typical element. Ignored if the dynamicSize property is true. |
|
|
426
426
|
| bufferSize | number? = 2 | Number of elements outside the scope of visibility. Default value is 2. |
|
|
427
427
|
| maxBufferSize | number? = 100 | Maximum number of elements outside the scope of visibility. Default value is 100. If maxBufferSize is set to be greater than bufferSize, then adaptive buffer mode is enabled. The greater the scroll size, the more elements are allocated for rendering. |
|
|
428
428
|
| itemRenderer | TemplateRef | Rendering element template. |
|
|
429
|
-
| stickyMap | [IVirtualListStickyMap?](https://github.com/DjonnyX/ng-virtual-list/blob/
|
|
429
|
+
| stickyMap | [IVirtualListStickyMap?](https://github.com/DjonnyX/ng-virtual-list/blob/16.x/projects/ng-virtual-list/src/lib/models/sticky-map.model.ts) | Dictionary zIndex by id of the list element. If the value is not set or equal to 0, then a simple element is displayed, if the value is greater than 0, then the sticky position mode is enabled for the element. 1 - position start, 2 - position end. |
|
|
430
430
|
| snap | boolean? = false | Determines whether elements will snap. Default value is "false". |
|
|
431
|
-
| snappingMethod | [SnappingMethod? = 'normal'](https://github.com/DjonnyX/ng-virtual-list/blob/
|
|
432
|
-
| direction | [Direction? = 'vertical'](https://github.com/DjonnyX/ng-virtual-list/blob/
|
|
431
|
+
| snappingMethod | [SnappingMethod? = 'normal'](https://github.com/DjonnyX/ng-virtual-list/blob/16.x/projects/ng-virtual-list/src/lib/enums/snapping-method.ts) | Snapping method. 'normal' - Normal group rendering. 'advanced' - The group is rendered on a transparent background. List items below the group are not rendered. |
|
|
432
|
+
| direction | [Direction? = 'vertical'](https://github.com/DjonnyX/ng-virtual-list/blob/16.x/projects/ng-virtual-list/src/lib/enums/direction.ts) | Determines the direction in which elements are placed. Default value is "vertical". |
|
|
433
433
|
| dynamicSize | boolean? = false | If true then the items in the list can have different sizes and the itemSize property is ignored. If false then the items in the list have a fixed size specified by the itemSize property. The default value is false. |
|
|
434
434
|
| enabledBufferOptimization | boolean? = true | Experimental! Enables buffer optimization. Can only be used if items in the collection are not added or updated. |
|
|
435
435
|
| trackBy | string? = 'id' | The name of the property by which tracking is performed. |
|
|
@@ -440,8 +440,8 @@ Outputs
|
|
|
440
440
|
|
|
441
441
|
| Event | Type | Description |
|
|
442
442
|
|---|---|---|
|
|
443
|
-
| onScroll | ([IScrollEvent](https://github.com/DjonnyX/ng-virtual-list/blob/
|
|
444
|
-
| onScrollEnd | ([IScrollEvent](https://github.com/DjonnyX/ng-virtual-list/blob/
|
|
443
|
+
| onScroll | ([IScrollEvent](https://github.com/DjonnyX/ng-virtual-list/blob/16.x/projects/ng-virtual-list/src/lib/models/scroll-event.model.ts)) => void | Fires when the list has been scrolled. |
|
|
444
|
+
| onScrollEnd | ([IScrollEvent](https://github.com/DjonnyX/ng-virtual-list/blob/16.x/projects/ng-virtual-list/src/lib/models/scroll-event.model.ts)) => void | Fires when the list has completed scrolling. |
|
|
445
445
|
|
|
446
446
|
<br/>
|
|
447
447
|
|
|
@@ -449,9 +449,9 @@ Methods
|
|
|
449
449
|
|
|
450
450
|
| Method | Type | Description |
|
|
451
451
|
|--|--|--|
|
|
452
|
-
| scrollTo | (id: [Id](https://github.com/DjonnyX/ng-virtual-list/blob/
|
|
452
|
+
| scrollTo | (id: [Id](https://github.com/DjonnyX/ng-virtual-list/blob/16.x/projects/ng-virtual-list/src/lib/types/id.ts), behavior: ScrollBehavior = 'auto') => number | The method scrolls the list to the element with the given id and returns the value of the scrolled area. Behavior accepts the values "auto", "instant" and "smooth". |
|
|
453
453
|
| scrollToEnd | (behavior?: ScrollBehavior) => void | Scrolls the scroll area to the desired element with the specified ID. |
|
|
454
|
-
| getItemBounds | (id: [Id](https://github.com/DjonnyX/ng-virtual-list/blob/
|
|
454
|
+
| getItemBounds | (id: [Id](https://github.com/DjonnyX/ng-virtual-list/blob/16.x/projects/ng-virtual-list/src/lib/types/id.ts), behavior?: ScrollBehavior) => void | Returns the bounds of an element with a given id |
|
|
455
455
|
|
|
456
456
|
<br/>
|
|
457
457
|
|