Getting Started

View as Markdown
Infinite Table is a UI component for data virtualization - helps you display huge datasets of tabular data.
@infinite-table/infinite-angular is Infinite Table for Angular: the same DataGrid, built from the same source and with the same focus on performance, as standalone Angular components with signal inputs, models and outputs.

Installation#

Infinite Table is available on the public npm registry - install it by running the following command:
Terminal
npm i @infinite-table/infinite-angular

Meet the Code#

#
This is an example to get you started with Infinite Table with minimal setup. Click edit to change the code and see the grid update.
open
loading demo…
Don't forget to add the CSS to your application's global styles to see the component in action - in the styles of the build options in angular.json, or at the top of src/styles.css:
@import '@infinite-table/infinite-angular/index.css';

Using the Components#

In the code snippet above, you notice we're using 2 components:
  • DataSource - this needs to be a parent (or ancestor, at any level) of the InfiniteTable component - it controls which data the table is rendering
  • InfiniteTable - the actual virtualized table component - needs to be inside a DataSource (can be at any level of nesting).
Both components are named exports of the @infinite-table/infinite-angular package.
In a template they are the <infinite-data-source> and <infinite-table> elements: add both classes to the imports of your component.

TypeScript Types#

Our TypeScript types are published as part of the package, as named exports from the root of the package.
There are 2 components that you can use and import:
  • InfiniteTable
  • DataSource
Each of those has types provided for all the props it exposes, with the pattern of <COMPONENT_NAME>Prop<PROP_NAME>, so here are a few examples to clarify the rule:
import type {
  InfiniteTablePropColumns, // or accessible as InfiniteTableProps['columns']
  // corresponding to the `columns` input
  DataSourcePropGroupBy, // or accessible as DataSourceProps['groupBy']
  // corresponding to the `groupBy` input
} from '@infinite-table/infinite-angular';

Learn about our TypeScript typings

Read more about how to use our TypeScript types.

Built for Angular#

Infinite Table for Angular is fully declarative and fully typed - standalone components, signals and OnPush, with no zone.js needed. It's configured through inputs, with the same names as the props of the React version:
  • bind inputs in the template - [columns]="columns", [columnDefaultWidth]="120". The templates are type-checked against your data type (strictTemplates).
  • the state the user changes (sorting, selection, column order, …) is a model: bind it two-way to a signal, for example [(sortInfo)]model. The uncontrolled version (defaultSortInfo) is an input that needs nothing bound back.
  • callbacks are outputs: (sortInfoChange), (cellClick).
  • columns stay plain objects. Their render* functions return text, a template (a TemplateRef), or a component (renderComponent(MyCell)) that reads the cell with injectColumnCell.
  • the imperative API is on the component: #grid="infiniteTable", then grid.api().
#
This is an example of how you might configure InfiniteTable in a real-world application and puts together several functionalities:
  • grouping
  • aggregation
  • pinned columns
  • sorting
  • multiple selection
  • custom cell rendering
open
loading demo…

Licensing#

@infinite-table/infinite-angular is published under the same license as the React package. Without a license key, the grid shows a Powered by Infinite Table footer. Provide your key once, for every grid of your application:
// app.config.ts
import type { ApplicationConfig } from '@angular/core';
import { provideInfiniteTable } from '@infinite-table/infinite-angular';

export const appConfig: ApplicationConfig = {
  providers: [
    the license key, for every grid of the application
    provideInfiniteTable({ licenseKey: 'your-license-key' }),
  ],
};
A grid's own [licenseKey] input wins over it.

More on Licensing

Read more about our licensing model and how you can use Infinite Table.

About the Docs#

We're grateful for the work done by the team behind reactjs.org and the new React documentation found at beta.reactjs.org - we've built our documentation on their excellent work 🙏 and we're grateful for that.
The documentation is versioned, and we will publish a new version of the documentation when there are any significant changes in the corresponding @infinite-table/infinite-angular version.