Skip to content

Commit

Permalink
Autocomplete: Issue with Virtual Scroll primefaces#12568
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzajazyri committed Feb 13, 2023
1 parent 085a4e6 commit 9e12265
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/components/scroller/scroller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,8 @@ export class Scroller implements OnInit, AfterContentInit, AfterViewChecked, OnD

calculateNumItems() {
const contentPos = this.getContentPosition();
const contentWidth = this.elementViewChild?.nativeElement ? this.elementViewChild.nativeElement.offsetWidth - contentPos.left : 0;
const contentHeight = this.elementViewChild?.nativeElement ? this.elementViewChild.nativeElement.offsetHeight - contentPos.top : 0;
const contentWidth = (this.elementViewChild?.nativeElement ? this.elementViewChild.nativeElement.offsetWidth - contentPos.left : 0) || 0;
const contentHeight = (this.elementViewChild?.nativeElement ? this.elementViewChild.nativeElement.offsetHeight - contentPos.top : 0) || 0;
const calculateNumItemsInViewport = (_contentSize, _itemSize) => Math.ceil(_contentSize / (_itemSize || _contentSize));
const calculateNumToleratedItems = (_numItems) => Math.ceil(_numItems / 2);
const numItemsInViewport: any = this.both
Expand Down

0 comments on commit 9e12265

Please sign in to comment.