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

@ea-controls/mat-table-extensions

v20.0.0

Published

Angular directives that allows to extend Angular [mat-table](https://material.angular.io/components/table/overview) features

Readme

MatTableExtensions

Angular directives that allows to extend Angular mat-table features

Dependencies

  1. @angular version > 19.0.0
  2. @angular/material ng add @angular/material

Multiple Headers/Footer

Usually mat-table only allows one header and footer inside [matColumnDef] directive

<table mat-table>
    <ng-container matColumnDef="position">
        <th mat-header-cell *matHeaderCellDef> No. </th> <!-- Only one header -->
        <td mat-cell *matCellDef="let element"> {{element.position}} </td>
    </ng-container>

    <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
</table>

With current library, now you can add more of them

<table mat-table>
    <ng-container matColumnDef="position">
        <th mat-header-cell *matHeaderCellDef> No. </th>
        <th mat-header-cell *matExtraHeaderCellDef="'extra-header-name'"> Extra Header </th> <!-- Extra header cell-->
        <td mat-cell *matCellDef="let element"> {{element.position}} </td>
    </ng-container>

    <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
    <tr mat-header-row *matExtraHeaderRowDef="displayedColumns; name: 'extra-header-name'"></tr> <!-- Extra header row -->
</table>

Steps

  1. Import MatExtraTableModule
  2. Add new *matExtraHeaderCellDef instead *matHeaderCellDef for extra headers
    1. You have to send any string value as cell identifier

      Replace extra-header-name with your custom name

    2. Notice you can use *matHeaderRowDef normally, new directive is only used when you need extra header cell
  3. Add new *matExtraHeaderRowDef instead *matHeaderRowDef for extra rows using extra header cells
    1. name is required to find extra header, it have to be the same use in matExtraHeaderCellDef attribute

      *matExtraHeaderRowDef="displayedColumns; name: 'extra-header-name'>"

    2. Notice you can use *matHeaderRowDef normally, new directive is only used when you need extra header row
  4. Similar tags you can use when extra footer is required
<td mat-footer-cell *matExtraFooterCellDef="'extra-footer-name'">Footer</th> <!-- Extra footer cell -->
<tr mat-header-row *matExtraFooterRowDef="displayedColumns; name: 'extra-footer-name'"></tr> <!-- Extra footer row -->

Full example


import { MatExtraTableModule } from '@ea-controls/mat-table-extensions';

export interface PeriodicElement {
  name: string;
  position: number;
  weight: number;
  symbol: string;
}

const ELEMENT_DATA: PeriodicElement[] = [
  { position: 1, name: 'Hydrogen', weight: 1.0079, symbol: 'H' },
  { position: 2, name: 'Helium', weight: 4.0026, symbol: 'He' },
  { position: 3, name: 'Lithium', weight: 6.941, symbol: 'Li' },
  { position: 4, name: 'Beryllium', weight: 9.0122, symbol: 'Be' },
  { position: 5, name: 'Boron', weight: 10.811, symbol: 'B' },
  { position: 6, name: 'Carbon', weight: 12.0107, symbol: 'C' },
  { position: 7, name: 'Nitrogen', weight: 14.0067, symbol: 'N' },
  { position: 8, name: 'Oxygen', weight: 15.9994, symbol: 'O' },
  { position: 9, name: 'Fluorine', weight: 18.9984, symbol: 'F' },
  { position: 10, name: 'Neon', weight: 20.1797, symbol: 'Ne' },
];

@Component({
  selector: 'app-basic',
  imports: [MatExtraTableModule],
  templateUrl: './basic.component.html'
})
export class BasicComponent {
  displayedColumns: string[] = ['position', 'name', 'weight', 'symbol'];
  dataSource = ELEMENT_DATA;
}
<table mat-table [dataSource]="dataSource" class="mat-elevation-z8">

    <!-- POSITION -->
    <ng-container matColumnDef="position">
        <th mat-header-cell *matHeaderCellDef> 1. from html </th>
        <th mat-header-cell *matExtraHeaderCellDef="'filter'">
            <input type="text">
        </th>

        <td mat-cell *matCellDef="let data"> xxxxxxxxxx from html </td>

        <td mat-footer-cell *matFooterCellDef> f1 </td>
        <th mat-footer-cell *matExtraFooterCellDef="'filter'" [attr.colspan]="2">f2</th>
    </ng-container>

    <!-- NAME -->
    <ng-container matColumnDef="name">
        <th mat-header-cell *matHeaderCellDef> Name </th>
        <th mat-header-cell *matExtraHeaderCellDef="'filter'">
            <input type="text">
        </th>

        <td mat-cell *matCellDef="let element"> {{element.name}} </td>

        <td mat-footer-cell *matFooterCellDef> f1 </td>
        <th mat-footer-cell *matExtraFooterCellDef="'filter'" [attr.colspan]="4">f2</th>
    </ng-container>

    <!-- WEIGHT -->
    <ng-container matColumnDef="weight">
        <th mat-header-cell *matHeaderCellDef> Weight </th>
        <th mat-header-cell *matExtraHeaderCellDef="'filter'">
            <input type="text">
        </th>

        <td mat-cell *matCellDef="let element"> {{element.weight}} </td>

        <td mat-footer-cell *matFooterCellDef> f1 </td>
    </ng-container>

    <!-- SYMBOL -->
    <ng-container matColumnDef="symbol">
        <th mat-header-cell *matHeaderCellDef> Symbol </th>
        <th mat-header-cell *matExtraHeaderCellDef="'filter'">
            <input type="text">
        </th>

        <td mat-cell *matCellDef="let element"> {{element.symbol}} </td>

        <td mat-footer-cell *matFooterCellDef> f1 </td>
    </ng-container>



    <!-- HEADERS -->
    <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
    <tr mat-header-row *matExtraHeaderRowDef="displayedColumns; name: 'filter'"></tr>

    <!-- CELLS -->
    <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>

    <!-- FOOTER -->
    <tr mat-footer-row *matFooterRowDef="displayedColumns"></tr>
    <tr mat-footer-row *matExtraFooterRowDef="['position', 'name']; name: 'filter'"></tr>

</table>

Join to my telegram group for supporting and commenting