@progress/kendo-angular-listview 19.0.0-develop.2 → 19.0.0-develop.4

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.
@@ -86,7 +86,13 @@ export class ListViewComponent {
86
86
  * The data collection that will be used to populate the ListView
87
87
  * ([see data binding examples]({% slug paging_listview %})).
88
88
  */
89
- data;
89
+ set data(value) {
90
+ this.lastScrollTop = this.contentContainer?.nativeElement.scrollTop ?? 0;
91
+ this._data = value;
92
+ }
93
+ get data() {
94
+ return this._data;
95
+ }
90
96
  /**
91
97
  * Specifies if the loading indicator of the ListView will be displayed
92
98
  * ([see example]({% slug paging_listview %}#toc-remote-binding)).
@@ -277,6 +283,8 @@ export class ListViewComponent {
277
283
  _skip = 0;
278
284
  _navigable = false;
279
285
  _pageable;
286
+ lastScrollTop;
287
+ _data;
280
288
  editServiceSubscription;
281
289
  constructor(ngZone, element, renderer, changeDetectorRef, editService, navigationService) {
282
290
  this.ngZone = ngZone;
@@ -288,6 +296,9 @@ export class ListViewComponent {
288
296
  validatePackage(packageMetadata);
289
297
  this.attachEditHandlers();
290
298
  }
299
+ ngAfterViewInit() {
300
+ this.lastScrollTop = this.contentContainer?.nativeElement.scrollTop;
301
+ }
291
302
  ngOnChanges(changes) {
292
303
  if (isChanged('height', changes, false)) {
293
304
  this.renderer.setStyle(this.element.nativeElement, 'height', `${this.height}px`);
@@ -391,12 +402,17 @@ export class ListViewComponent {
391
402
  /**
392
403
  * @hidden
393
404
  */
394
- handleContentScroll() {
405
+ handleContentScroll = () => {
395
406
  if (!hasObservers(this.scrollBottom)) {
396
407
  return;
397
408
  }
398
409
  const THRESHOLD = 2;
399
410
  const { scrollHeight, scrollTop, clientHeight } = this.contentContainer.nativeElement;
411
+ const isScrollUp = this.lastScrollTop > scrollTop;
412
+ this.lastScrollTop = scrollTop;
413
+ if (isScrollUp) {
414
+ return;
415
+ }
400
416
  const atBottom = scrollHeight - clientHeight - scrollTop <= THRESHOLD;
401
417
  if (atBottom) {
402
418
  this.ngZone.run(() => {
@@ -404,7 +420,7 @@ export class ListViewComponent {
404
420
  this.scrollBottom.emit(event);
405
421
  });
406
422
  }
407
- }
423
+ };
408
424
  /**
409
425
  * @hidden
410
426
  */
@@ -10,7 +10,7 @@ export const packageMetadata = {
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCode: 'KENDOUIANGULAR',
12
12
  productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1745321906,
14
- version: '19.0.0-develop.2',
13
+ publishDate: 1745572381,
14
+ version: '19.0.0-develop.4',
15
15
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
16
16
  };
@@ -25,8 +25,8 @@ const packageMetadata = {
25
25
  productName: 'Kendo UI for Angular',
26
26
  productCode: 'KENDOUIANGULAR',
27
27
  productCodes: ['KENDOUIANGULAR'],
28
- publishDate: 1745321906,
29
- version: '19.0.0-develop.2',
28
+ publishDate: 1745572381,
29
+ version: '19.0.0-develop.4',
30
30
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
31
31
  };
32
32
 
@@ -641,7 +641,13 @@ class ListViewComponent {
641
641
  * The data collection that will be used to populate the ListView
642
642
  * ([see data binding examples]({% slug paging_listview %})).
643
643
  */
644
- data;
644
+ set data(value) {
645
+ this.lastScrollTop = this.contentContainer?.nativeElement.scrollTop ?? 0;
646
+ this._data = value;
647
+ }
648
+ get data() {
649
+ return this._data;
650
+ }
645
651
  /**
646
652
  * Specifies if the loading indicator of the ListView will be displayed
647
653
  * ([see example]({% slug paging_listview %}#toc-remote-binding)).
@@ -832,6 +838,8 @@ class ListViewComponent {
832
838
  _skip = 0;
833
839
  _navigable = false;
834
840
  _pageable;
841
+ lastScrollTop;
842
+ _data;
835
843
  editServiceSubscription;
836
844
  constructor(ngZone, element, renderer, changeDetectorRef, editService, navigationService) {
837
845
  this.ngZone = ngZone;
@@ -843,6 +851,9 @@ class ListViewComponent {
843
851
  validatePackage(packageMetadata);
844
852
  this.attachEditHandlers();
845
853
  }
854
+ ngAfterViewInit() {
855
+ this.lastScrollTop = this.contentContainer?.nativeElement.scrollTop;
856
+ }
846
857
  ngOnChanges(changes) {
847
858
  if (isChanged('height', changes, false)) {
848
859
  this.renderer.setStyle(this.element.nativeElement, 'height', `${this.height}px`);
@@ -946,12 +957,17 @@ class ListViewComponent {
946
957
  /**
947
958
  * @hidden
948
959
  */
949
- handleContentScroll() {
960
+ handleContentScroll = () => {
950
961
  if (!hasObservers(this.scrollBottom)) {
951
962
  return;
952
963
  }
953
964
  const THRESHOLD = 2;
954
965
  const { scrollHeight, scrollTop, clientHeight } = this.contentContainer.nativeElement;
966
+ const isScrollUp = this.lastScrollTop > scrollTop;
967
+ this.lastScrollTop = scrollTop;
968
+ if (isScrollUp) {
969
+ return;
970
+ }
955
971
  const atBottom = scrollHeight - clientHeight - scrollTop <= THRESHOLD;
956
972
  if (atBottom) {
957
973
  this.ngZone.run(() => {
@@ -959,7 +975,7 @@ class ListViewComponent {
959
975
  this.scrollBottom.emit(event);
960
976
  });
961
977
  }
962
- }
978
+ };
963
979
  /**
964
980
  * @hidden
965
981
  */
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { EventEmitter, NgZone, Renderer2, ElementRef, SimpleChanges, QueryList, ChangeDetectorRef } from '@angular/core';
5
+ import { EventEmitter, NgZone, Renderer2, ElementRef, SimpleChanges, QueryList, ChangeDetectorRef, AfterViewInit, OnDestroy, OnChanges } from '@angular/core';
6
6
  import { NavigationService } from './navigation/navigation.service';
7
7
  import { ListViewNavigableItemDirective } from './navigation/listview-navigable-item.directive';
8
8
  import { ItemTemplateDirective } from './templates/item-template.directive';
@@ -25,7 +25,7 @@ import * as i0 from "@angular/core";
25
25
  /**
26
26
  * Represents the Kendo UI ListView component for Angular.
27
27
  */
28
- export declare class ListViewComponent {
28
+ export declare class ListViewComponent implements AfterViewInit, OnChanges, OnDestroy {
29
29
  ngZone: NgZone;
30
30
  element: ElementRef;
31
31
  renderer: Renderer2;
@@ -74,7 +74,8 @@ export declare class ListViewComponent {
74
74
  * The data collection that will be used to populate the ListView
75
75
  * ([see data binding examples]({% slug paging_listview %})).
76
76
  */
77
- data: any[] | ListViewDataResult;
77
+ set data(value: any[] | ListViewDataResult | undefined);
78
+ get data(): any[] | ListViewDataResult | undefined;
78
79
  /**
79
80
  * Specifies if the loading indicator of the ListView will be displayed
80
81
  * ([see example]({% slug paging_listview %}#toc-remote-binding)).
@@ -84,35 +85,35 @@ export declare class ListViewComponent {
84
85
  * The CSS styles that will be rendered on the content container element of the ListView.
85
86
  * Supports the type of values that are supported by [`ngStyle`](link:site.data.urls.angular['ngstyleapi']).
86
87
  */
87
- containerStyle: {
88
+ containerStyle?: {
88
89
  [key: string]: string;
89
90
  };
90
91
  /**
91
92
  * The CSS styles that will be rendered on each item element wrapper of the ListView.
92
93
  * Supports the type of values that are supported by [`ngStyle`](link:site.data.urls.angular['ngstyleapi']).
93
94
  */
94
- itemStyle: {
95
+ itemStyle?: {
95
96
  [key: string]: string;
96
97
  };
97
98
  /**
98
99
  * The CSS class that will be rendered on the content container element of the ListView.
99
100
  * Supports the type of values that are supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
100
101
  */
101
- containerClass: string | string[] | Set<string> | {
102
+ containerClass?: string | string[] | Set<string> | {
102
103
  [key: string]: boolean;
103
104
  };
104
105
  /**
105
106
  * The CSS class that will be rendered on each item element wrapper of the ListView.
106
107
  * Supports the type of values that are supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
107
108
  */
108
- itemClass: string | string[] | Set<string> | {
109
+ itemClass?: string | string[] | Set<string> | {
109
110
  [key: string]: boolean;
110
111
  };
111
112
  /**
112
113
  * Specifies the content container `aria-label` attribute
113
114
  * ([see example]({% slug accessibility_listview %}#toc-accessible-names)).
114
115
  */
115
- containerLabel: string;
116
+ containerLabel?: string;
116
117
  /**
117
118
  * Specifies the content container `role` attribute
118
119
  * ([more details]({% slug accessibility_listview %}#toc-wai-aria-support)).
@@ -136,7 +137,7 @@ export declare class ListViewComponent {
136
137
  * Defines the page size used by the ListView pager
137
138
  * ([more details]({% slug paging_listview %})).
138
139
  */
139
- pageSize: number;
140
+ pageSize?: number;
140
141
  /**
141
142
  * Defines the number of records to be skipped by the pager
142
143
  * ([more details]({% slug paging_listview %})).
@@ -156,7 +157,7 @@ export declare class ListViewComponent {
156
157
  * To set the height of the ListView, you can also use `style.height`. The `style.height`
157
158
  * option supports units such as `px`, `%`, `em`, `rem`, and others.
158
159
  */
159
- height: number;
160
+ height?: number;
160
161
  /**
161
162
  * Fires when the user scrolls to the last record on the page
162
163
  * ([see endless scrolling example]({% slug scrollmodes_listview %}#toc-endless-scrolling)).
@@ -230,8 +231,11 @@ export declare class ListViewComponent {
230
231
  private _skip;
231
232
  private _navigable;
232
233
  private _pageable;
234
+ private lastScrollTop;
235
+ private _data;
233
236
  private editServiceSubscription;
234
237
  constructor(ngZone: NgZone, element: ElementRef, renderer: Renderer2, changeDetectorRef: ChangeDetectorRef, editService: EditService, navigationService: NavigationService);
238
+ ngAfterViewInit(): void;
235
239
  ngOnChanges(changes: SimpleChanges): void;
236
240
  ngOnDestroy(): void;
237
241
  /**
@@ -286,7 +290,7 @@ export declare class ListViewComponent {
286
290
  /**
287
291
  * @hidden
288
292
  */
289
- handleContentScroll(): void;
293
+ handleContentScroll: () => void;
290
294
  /**
291
295
  * @hidden
292
296
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-listview",
3
- "version": "19.0.0-develop.2",
3
+ "version": "19.0.0-develop.4",
4
4
  "description": "Kendo UI Angular listview component",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -19,7 +19,7 @@
19
19
  "package": {
20
20
  "productName": "Kendo UI for Angular",
21
21
  "productCode": "KENDOUIANGULAR",
22
- "publishDate": 1745321906,
22
+ "publishDate": 1745572381,
23
23
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
24
24
  }
25
25
  },
@@ -30,16 +30,16 @@
30
30
  "@angular/forms": "16 - 19",
31
31
  "@angular/platform-browser": "16 - 19",
32
32
  "@progress/kendo-licensing": "^1.5.0",
33
- "@progress/kendo-angular-buttons": "19.0.0-develop.2",
34
- "@progress/kendo-angular-common": "19.0.0-develop.2",
35
- "@progress/kendo-angular-icons": "19.0.0-develop.2",
36
- "@progress/kendo-angular-l10n": "19.0.0-develop.2",
37
- "@progress/kendo-angular-pager": "19.0.0-develop.2",
33
+ "@progress/kendo-angular-buttons": "19.0.0-develop.4",
34
+ "@progress/kendo-angular-common": "19.0.0-develop.4",
35
+ "@progress/kendo-angular-icons": "19.0.0-develop.4",
36
+ "@progress/kendo-angular-l10n": "19.0.0-develop.4",
37
+ "@progress/kendo-angular-pager": "19.0.0-develop.4",
38
38
  "rxjs": "^6.5.3 || ^7.0.0"
39
39
  },
40
40
  "dependencies": {
41
41
  "tslib": "^2.3.1",
42
- "@progress/kendo-angular-schematics": "19.0.0-develop.2"
42
+ "@progress/kendo-angular-schematics": "19.0.0-develop.4"
43
43
  },
44
44
  "schematics": "./schematics/collection.json",
45
45
  "module": "fesm2022/progress-kendo-angular-listview.mjs",
@@ -4,12 +4,12 @@ const schematics_1 = require("@angular-devkit/schematics");
4
4
  function default_1(options) {
5
5
  const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'ListViewModule', package: 'listview', peerDependencies: {
6
6
  // Peers of pager
7
- '@progress/kendo-angular-dropdowns': '19.0.0-develop.2',
8
- '@progress/kendo-angular-treeview': '19.0.0-develop.2',
9
- '@progress/kendo-angular-inputs': '19.0.0-develop.2',
10
- '@progress/kendo-angular-intl': '19.0.0-develop.2',
11
- '@progress/kendo-angular-l10n': '19.0.0-develop.2',
12
- '@progress/kendo-angular-popup': '19.0.0-develop.2',
7
+ '@progress/kendo-angular-dropdowns': '19.0.0-develop.4',
8
+ '@progress/kendo-angular-treeview': '19.0.0-develop.4',
9
+ '@progress/kendo-angular-inputs': '19.0.0-develop.4',
10
+ '@progress/kendo-angular-intl': '19.0.0-develop.4',
11
+ '@progress/kendo-angular-l10n': '19.0.0-develop.4',
12
+ '@progress/kendo-angular-popup': '19.0.0-develop.4',
13
13
  '@progress/kendo-drawing': '^1.17.2',
14
14
  // Peer of icons
15
15
  '@progress/kendo-svg-icons': '^4.0.0'