Getting Started
Infinite Tableis 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:npm i @infinite-table/infinite-angularMeet 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.
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: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 theInfiniteTablecomponent - it controls whichdatathe table is renderingInfiniteTable- the actual virtualized table component - needs to be inside aDataSource(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:
InfiniteTableDataSource
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: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 (aTemplateRef), or a component (renderComponent(MyCell)) that reads the cell withinjectColumnCell. - the imperative API is on the component:
#grid="infiniteTable", thengrid.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
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: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.