npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ngx-infinite-scroll-mat-autocomplete

v20.0.1

Published

A package based off of ngx-infinite-scroll that works with mat autocomplete

Readme

Angular Infinite Scroll for Mat Autocomplete

A package to add infinite scrolling to Angular material autocomplete. Designed to imitate ngx-infinite-scroll in usage and api.

Versions

Versions follow Angular's version to easily reflect compatibility. Meaning, for Angular 18, use ngx-infinite-scroll-mat-autocomplete @ ^18.0.0. This project was created for Angular 18 and so does not support versions beneath that.

Installation

npm install --save ngx-infinite-scroll-mat-autocomplete

Supported API

Properties

| @Input() | Type | Required | Default | Description | | ---------------------- | ------ | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | infiniteScrollDistance | number | optional | 2 | the bottom percentage point of the scroll nob relatively to the infinite-scroll container (i.e, 2 (2 * 10 = 20%) is event is triggered when 80% (100% - 20%) has been scrolled). if container.height is 900px, when the container is scrolled to or past the 720px, it will fire the scrolled event. | | infiniteScrollThrottle | number | optional | 150 | should get a number of milliseconds for throttle. The event will be triggered this many milliseconds after the user stops scrolling. |

Events

| @Output() | Type | Event Type | Required | Description | | ---------- | ------------ | ---------- | -------- | --------------------------------------------------------------------------------------- | | scrolled | EventEmitter | void | optional | this will callback if the distance threshold has been reached on a scroll down. | | scrollPerc | EventEmitter | number | optional | this will callback every time the scroll event triggers and give a percentage scrolled. |

Behavior

The directive listens to the autocomplete panel scroll event and invoked the callback.

Usage

In this example, the onScroll callback will be invoked when the mat autocomplete is scrolled down by 80%. The scrollPerc will trigger every time the scroll percentage changes:

import { Component } from '@angular/core';
import { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatAutocomplete, MatAutocompleteTrigger, MatOption } from '@angular/material/autocomplete';
import { MatFormField, MatLabel } from '@angular/material/form-field';
import { MatInput } from '@angular/material/input';
import { InfiniteScrollMatAutocompleteDirective } from 'ngx-infinite-scroll-mat-autocomplete';

@Component({
  selector: 'app',
  standalone: true,
  imports: [
    MatFormField,
    MatLabel,
    MatInput,
    MatAutocomplete,
    MatAutocompleteTrigger,
    MatOption,
    FormsModule,
    ReactiveFormsModule,
    InfiniteScrollMatAutocompleteDirective,
  ],
  template: `
    <mat-form-field>
      <mat-label>Infinite Scroll Autocomplete</mat-label>
      <input matInput type="text" [formControl]="formControl" [matAutocomplete]="auto" />

      <mat-autocomplete
        #auto="matAutocomplete"
        infiniteScrollMatAutocomplete
        [infiniteScrollDistance]="2" // Default distance but here to show usage
        [infiniteScrollThrottle]="150" // Default distance but here to show usage
        (scrolled)="onScroll()"
        (scrollPerc)="updatedScrollPerc($event)"
      >
        @for (option of options; track option) {
          <mat-option>{{ option }}</mat-option>
        }
      </mat-autocomplete>
    </mat-form-field>
  `,
})
export class AppComponent {
  formControl = new FormControl<string>('');
  options: string[] = [];

  onScroll(): void {
    console.log('On scroll called');
  }

  updatedScrollPerc(perc: number): void {
    console.log(`Scroll perc updated to ${perc}`);
  }
}

Inspiration

A big thanks again to ngx-infinite-scroll for all the hard work they've put into their library and inspiring this one. Go check them out for other great infinite scrolling in Angular.