# @universis/ngx-tables

> An implementation of [datatables.net](https://github.com/DataTables/DataTables) for [Universis project](https://gitlab.com/universis) applications.

Latest version **6.14.2** (published 2026-04-17) · 0 weekly downloads

## Install

```sh
npm install @universis/ngx-tables
pnpm add @universis/ngx-tables
yarn add @universis/ngx-tables
bun add @universis/ngx-tables
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 6.14.2 |
| Published | 2026-04-17 |
| First published | 2021-10-07 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 10 |
| Unpacked size | 4.6 MB |
| Known vulnerabilities | 0 (+7 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | universis |

## Links

- npm: https://www.npmjs.com/package/@universis/ngx-tables
- npm.io page: https://npm.io/package/@universis/ngx-tables

## Dependencies (10)

- [tslib](https://npm.io/package/tslib.md) ^1.9.0
- [jsrsasign](https://npm.io/package/jsrsasign.md) ^10.0.5
- [ngx-pipes](https://npm.io/package/ngx-pipes.md) ^2.7.5
- [datatables.net](https://npm.io/package/datatables.net.md) ^1.13.11
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) ^1.5.6
- [datatables.net-rowgroup](https://npm.io/package/datatables.net-rowgroup.md) 1.1.3
- [datatables.net-scroller](https://npm.io/package/datatables.net-scroller.md) ^1.5.1
- [datatables.net-buttons-dt](https://npm.io/package/datatables.net-buttons-dt.md) ^1.5.6
- [datatables.net-colreorder](https://npm.io/package/datatables.net-colreorder.md) ^1.7.2
- [datatables.net-fixedcolumns](https://npm.io/package/datatables.net-fixedcolumns.md) ^4.1.0

## Recent versions

- 6.14.2 (latest) — 2026-04-17
- 15.1.0 (lts-15) — 2026-11-12
- 9.14.2 (lts-9) — 2026-10-11
- 6.14.0 — 2025-11-11
- 6.13.9 — 2025-09-10
- 6.13.8 — 2025-09-09
- 6.13.7 — 2025-09-05
- 6.13.6 — 2025-07-11
- 6.13.5 — 2025-05-29
- 6.13.4 — 2025-05-29
- 6.13.3 — 2025-04-30
- 6.13.2 — 2025-04-30
- 6.13.1 — 2025-04-29
- 6.13.0 — 2025-04-29
- 6.3.0 — 2025-04-27
- … 70 more at https://npm.io/package/@universis/ngx-tables/versions

## README

## @universis/ngx-tables

An implementation of [datatables.net](https://github.com/DataTables/DataTables) for [Universis project](https://gitlab.com/universis) applications.

## Installation

Install @universis/ngx-tables in an angular cli by executing:

    npm i @universis/ngx-tables

Important note: Don't forget to install peer dependencies also.

## Usage

Import `TablesModule`:

    # app.module.ts
    import { TablesModule } from '@universis/ngx-tables';
    ...
    imports: [
      CommonModule,
      BrowserModule,
      HttpClientModule,
      TranslateModule.forRoot(),
      SharedModule.forRoot(),
      RouterModule,
      ...
      ...
      TablesModule
    ],

Add `AdvancedTableComponent`:

    <app-advanced-table #table [config]="tableConfiguration"></app-advanced-table>

and load a table configuration:

    export const TABLE1_COFIGURATION = {
      "title": "Students",
      "model": "Students",
      "searchExpression":"indexof(person/familyName, '${text}') ge 0 or indexof(person/givenName, '${text}') ge 0",
      "selectable": false,
      "multipleSelect": false,
      "columns": [
        {
          "name":"id",
          "property": "id",
          "hidden": true
        },
        {
          "name":"person/familyName",
          "property": "familyName",
          "title":"Family Name"
        },
        {
          "name":"person/givenName",
          "property": "givenName",
          "title":"Given Name"
        },
        ...
      ],
      "criteria": [
        {
          "name": "studentName",
          "filter": "(indexof(person/familyName, '${value}') ge 0 or indexof(person/givenName, '${value}') ge 0 or indexof(concat(person/familyName, ' ', person/givenName),'${value}') ge 0)",
          "type": "text"
        },
        {
          "name": "username",
          "filter": "(indexof(user/name, '${value}') ge 0)",
          "type": "text"
        },
        ...
      ],
      "searches": [
      ],
      "defaults":{
        "filter": "studentStatus/alternateName eq eq 'active'"
      },
      "paths" : [
      ]
    }

Use this configuration in component:

    # table1.component.ts
    import {TABLE1_COFIGURATION} from './table1.configuration';
    @Component({
      selector: 'app-table1',
      templateUrl: './table1.component.html'
    })
    export class Table1Component implements OnInit {
      
      public tableConfiguration: any = TABLE1_COFIGURATION;
      public filter: any = {};
      
      constructor() {
      }

      ngOnInit() {
      }

    }

`AdvancedTableComponent` uses table configuration to load data from the given `model` and draw datatable.
Use `AdvancedTableComponent.configSrc` to load table configuration from a json file.

    <app-advanced-table #table [autoLoad]=false [configSrc]="'/assets/tables/table3.config.json'"></app-advanced-table>

`AdvancedSearchComponent` enables search operation against a loaded datatable.

    <app-advanced-table-search #advancedSearch [mergeQueryParams]="true" [(filter)]="filter.value" [collapsed]="false" [showMore]="true" [table]="table">
     <advanced-search>
          <app-advanced-search-form [formSrc]="'/assets/tables/table2.search.json'" #search [(filter)]="filter.value"></app-advanced-search-form>
      </advanced-search>
    </app-advanced-table-search>

`AdvancedSearchComponent` has a simple text box for text search based on `AdvancedTableComponent#config.searchExpression` expression.

`AdvancedSearchComponent` may also have an advanced search form for searching by using lookup tables, numbers, booleans etc.

---
_Source: https://npm.io/package/@universis/ngx-tables · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
