From af11264b774d6aee9458ef1639ad76c64a1b842a Mon Sep 17 00:00:00 2001 From: Bernhard Pottler Date: Sun, 19 Jul 2026 08:34:47 +0200 Subject: [PATCH] chore(release): 17.3.0 --- CHANGELOG.md | 17 + README.md | 2 +- package.json | 2 +- projects/mat-datatable-lib/CHANGELOG.md | 17 + projects/mat-datatable-lib/README.md | 486 +++++++++++++----------- projects/mat-datatable-lib/package.json | 2 +- 6 files changed, 296 insertions(+), 230 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99f3523..aad6313 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,23 @@ All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. +## [17.3.0](https://github.com/BePo65/mat-datatable/compare/v17.2.13...v17.3.0) (2026-07-19) + + +### ⚠ BREAKING CHANGES + +* field 'cell' in MatColumnDefinition changed, 'remoteAccess' removed + +### Features + +* add boolean value formatted as img-Column ([bf0bd39](https://github.com/BePo65/mat-datatable/commit/bf0bd397da836f9d651df234c3180b5610824fca)) + + +### Bug Fixes + +* resolve errors shown by eslint ([7f9c6da](https://github.com/BePo65/mat-datatable/commit/7f9c6da956188792907346398f2304e15e83b4b3)) +* update packages to latest versions ([7765736](https://github.com/BePo65/mat-datatable/commit/7765736d7484533452f75654b51ab8854d335c61)) + ## [17.2.13](https://github.com/BePo65/mat-datatable/compare/v17.2.12...v17.2.13) (2026-04-03) ### Bug Fixes diff --git a/README.md b/README.md index 5212984..05da908 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A simple data table with virtual scrolling using Angular Material. -[![Version](https://img.shields.io/badge/version-17.2.13-blue.svg?cacheSeconds=86400)](https://github.com/BePo65/mat-datatable/blob/main/CHANGELOG.md) +[![Version](https://img.shields.io/badge/version-17.3.0-blue.svg?cacheSeconds=86400)](https://github.com/BePo65/mat-datatable/blob/main/CHANGELOG.md) [![License](https://img.shields.io/badge/License-MIT-yellow.svg?cacheSeconds=86400)](https://github.com/BePo65/mat-datatable/blob/main/LICENSE) [![Angular version](https://img.shields.io/github/package-json/dependency-version/bepo65/mat-datatable/@angular/core?color=red&label=Angular&logo=angular&logoColor=red)](https://angular.dev/overview) [![GitHub package.json dependency version (prod)](https://img.shields.io/github/package-json/dependency-version/bepo65/mat-datatable/@angular/material?color=red&label=Angular-Material&logo=angular&logoColor=red)](https://v17.material.angular.dev/components/categories) diff --git a/package.json b/package.json index 9ac9dd5..e607ff5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mat-datatable", - "version": "17.2.13", + "version": "17.3.0", "description": "A component for Angular using Angular Material that implements a table as a simplified replacement for ngx-datatable. The project contains a library component and a demo project.", "repository": { "type": "git", diff --git a/projects/mat-datatable-lib/CHANGELOG.md b/projects/mat-datatable-lib/CHANGELOG.md index 99f3523..aad6313 100644 --- a/projects/mat-datatable-lib/CHANGELOG.md +++ b/projects/mat-datatable-lib/CHANGELOG.md @@ -2,6 +2,23 @@ All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. +## [17.3.0](https://github.com/BePo65/mat-datatable/compare/v17.2.13...v17.3.0) (2026-07-19) + + +### ⚠ BREAKING CHANGES + +* field 'cell' in MatColumnDefinition changed, 'remoteAccess' removed + +### Features + +* add boolean value formatted as img-Column ([bf0bd39](https://github.com/BePo65/mat-datatable/commit/bf0bd397da836f9d651df234c3180b5610824fca)) + + +### Bug Fixes + +* resolve errors shown by eslint ([7f9c6da](https://github.com/BePo65/mat-datatable/commit/7f9c6da956188792907346398f2304e15e83b4b3)) +* update packages to latest versions ([7765736](https://github.com/BePo65/mat-datatable/commit/7765736d7484533452f75654b51ab8854d335c61)) + ## [17.2.13](https://github.com/BePo65/mat-datatable/compare/v17.2.12...v17.2.13) (2026-04-03) ### Bug Fixes diff --git a/projects/mat-datatable-lib/README.md b/projects/mat-datatable-lib/README.md index 9b1e3a9..05da908 100644 --- a/projects/mat-datatable-lib/README.md +++ b/projects/mat-datatable-lib/README.md @@ -4,7 +4,7 @@ A simple data table with virtual scrolling using Angular Material. -[![Version](https://img.shields.io/badge/version-17.2.13-blue.svg?cacheSeconds=86400)](https://github.com/BePo65/mat-datatable/blob/main/CHANGELOG.md) +[![Version](https://img.shields.io/badge/version-17.3.0-blue.svg?cacheSeconds=86400)](https://github.com/BePo65/mat-datatable/blob/main/CHANGELOG.md) [![License](https://img.shields.io/badge/License-MIT-yellow.svg?cacheSeconds=86400)](https://github.com/BePo65/mat-datatable/blob/main/LICENSE) [![Angular version](https://img.shields.io/github/package-json/dependency-version/bepo65/mat-datatable/@angular/core?color=red&label=Angular&logo=angular&logoColor=red)](https://angular.dev/overview) [![GitHub package.json dependency version (prod)](https://img.shields.io/github/package-json/dependency-version/bepo65/mat-datatable/@angular/material?color=red&label=Angular-Material&logo=angular&logoColor=red)](https://v17.material.angular.dev/components/categories) @@ -60,7 +60,7 @@ A simple data table with virtual scrolling using Angular Material. This project extends 'angular material table' so that it can be used as a replacement for [ngx-datatable](https://github.com/swimlane/ngx-datatable) in one of my projects. Unluckily ngx-datatable seems to be dead as it is still on angular v12 and an update to a more recent angular version is not in sight. -Nat-Datatable implements a table with virtual scrolling, sorting and filtering. Only a minimal set of the functionality of ngx-datatable is implemented. +Mat-Datatable implements a table with virtual scrolling, sorting and filtering. Only a minimal set of the functionality of ngx-datatable is implemented. ![Screenshot](assets/screenshot.jpg 'Screenshot of the demo page') @@ -80,46 +80,72 @@ The package can be used in Angular apps with Angular Material installed. ### Installation -Install the package from npmjs +Install the package from npmjs: ```sh -npm install @bepo65/mat-datatable +npm install mat-datatable ``` ### Embed Mat-Datatable In Your Project -Configure your angular application module (e.g: app.module.ts): +Use the component as a standalone Angular component. Some properties of mat-datatable must be configured in the component class (for example in app.component.ts): ```ts -... -import { MatDatatableModule } from 'mat-datatable'; - -@NgModule({ - ... - imports: [ - ... - MatDatatableModule - ] +import { Component } from '@angular/core'; +import { MatDatatableComponent, MatColumnDefinition } from 'mat-datatable'; + +@Component({ + selector: 'app-root', + standalone: true, + imports: [MatDatatableComponent], + templateUrl: './app.component.html', + styleUrls: ['./app.component.scss'] }) +export class AppComponent { + protected dataStore = new MyTableDataStore(); + + protected columnDefinitions: MatColumnDefinition[] = [ + { + columnId: 'id', + header: 'ID', + cell: (row) => ({ type: 'string', text: row.id.toString() }) + }, + { + columnId: 'name', + sortable: true, + resizable: true, + header: 'Name', + cell: (row) => ({ type: 'string', text: row.name }) + } + ]; + + protected displayedColumns: string[] = ['id', 'name']; +} +``` + +The `cell` callback returns a typed content descriptor, so you can render plain strings, mailto links or images without changing the table API: + +```ts +cell: (row) => ({ type: 'mailtoLink', text: row.email, url: `mailto:${row.email}` }); ``` -Add Mat-Datatable to your html file (e.g: app.component.html): +Add Mat-Datatable to your HTML file (for example app.component.html): ```html
- loading... + Loading...
``` -The height of the element containing the mat-datatable must be set explicitly (e.g: app.component.scss): +The height of the element containing the mat-datatable must be set explicitly (for example app.component.scss): ```css .content-table { @@ -129,31 +155,10 @@ The height of the element containing the mat-datatable must be set explicitly (e } ``` -Some properties of mat-datatable must be configured in the component class (e,g, app.component.ts): +The `cell` callback returns a typed content descriptor, so you can render plain strings, mailto links or images without changing the table API: ```ts -export class AppComponent { - ... - protected dataStore = new MyTableDataStore(); - protected columnDefinitions: MatColumnDefinition[] = [ - { - columnId: 'id', - header: 'ID', - cell: (row: DemoTableItem) => row?.userId?.toString(), - footer: 'id' - }, - { - columnId: 'name', - sortable: true, - resizable: true, - header: 'Name', - cell: (row: DemoTableItem) => row?.firstName, - footer: 'name' - } - - ]; - protected displayedColumns: string[] = ['id', 'name']; - +cell: (row) => ({ type: 'mailtoLink', text: row.email, url: `mailto:${row.email}` }); ```

(back to top)

@@ -187,112 +192,65 @@ Navigate to http://localhost:4200 ## API Reference -`import { MatDatatable } from '@bepo65/mat-datatable';` +```ts +import { + MatDatatableComponent, + MatColumnDefinition, + CellValueString, + CellValueImage, + CellValueMailTo, + MatSortDefinition, + DataStoreProvider, + FieldFilterDefinition, + RowSelectionType +} from 'mat-datatable'; +``` ### Classes -#### **MatDatatable** +#### MatDatatableComponent -Component to create an angular material table based datatable. -The component is generic; the given type is used to define the object for the row data. +Standalone Angular component for rendering a virtualized Material table. The component is generic so the row type can be provided with the template parameter. -##### **Properties** +##### Inputs -| Name | Description | -| ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `@Input() columnDefinitions: MatColumnDefinition[]` | The definition of the columns used in the table. The order of the definitions needs not to correspond to the order of the columns in the table. Default value: `[]`. | -| | | - -| Name | Description | -| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `@Input() displayedColumns: string[]` | A list with the names of the columns in the table. The array contains the 'columnId' of the corresponding column definition. Default value: `[]`. | -| | | - -| Name | Description | -| --------------------------------------------- | --------------------------------------------------- | -| `@Input() rowSelectionMode: RowSelectionType` | The type of row selection. Default value: `'none'`. | -| | | - -| Name | Description | -| -------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `@Input() dataStoreProvider: DataStoreProvider` | An object that connects the mat-datatable with the data source. The object must be the instance of a class implementing the DataStoreProvider interface. Default value: `new EmptyDataStoreProvider`. | -| | | - -| Name | Description | -| ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `@Input() trackBy(): TrackByFunction` | A function that returns a value that identifies a single row. Default value: `(index: number, item: T) => JSON.stringify(item)`. | -| | | - -| Name | Description | -| ------------------- | ---------------------------------------------------------- | -| withFooter: boolean | Whether the table has a footer row. Default value: `true`. | -| | | - -| Name | Description | -| ------------------------------------- | ------------------------------ | -| `@Output() rowClick: EventEmitter` | Emitted when a row is clicked. | -| | | - -| Name | Description | -| ----------------------------------------------- | ----------------------------------------------- | -| @Output() rowSelectionChange: EventEmitter | Emitted when the list of selected rows changes. | -| | | - -| Name | Description | -| --------------------------------------------------------- | ----------------------------------------- | -| `@Output() sortChange: EventEmitter` | Emitted when the sort definition changes. | -| | | - -| Name | Description | -| ---------------------------------------------- | -------------------------------------------------------- | -| `firstVisibleIndexChanged: Observable` | Emitted when the index of the first visible row changes. | -| | | - -| Name | Description | -| -------------------------------------- | ------------------------------------------------------------------------------------------------------ | -| `totalRowsChanged: Observable` | Emitted when the total number of rows in the datastore changes (does not depend on any active filter). | -| | | - -| Name | Description | -| ----------------------------------------- | ------------------------------------------------- | -| `filteredRowsChanged: Observable` | Emitted when the number of filtered rows changes. | -| | | - -| Name | Description | -| ------------------------------ | ------------------------ | -| `activatedRow: T \| undefined` | Marks a row as 'active'. | -| | | - -| Name | Description | -| ------------------- | ------------------------- | -| `selectedRows: T[]` | Marks rows as 'selected'. | -| | | - -| Name | Description | -| -------------------------------------- | ---------------------------------------- | -| `sortDefinitions: MatSortDefinition[]` | Gets / sets the current sort definition. | -| | | - -| Name | Description | -| ----------------------------------------------- | ------------------------------------------ | -| `filterDefinitions: FieldFilterDefinition[]` | Gets / sets the current filter definition. | -| | | +| Name | Description | +| --------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `columnDefinitions: MatColumnDefinition[]` | Column definitions for the table. The order of the definitions does not need to match the visible column order. | +| `displayedColumns: string[]` | List of visible column IDs in the order they should be rendered. | +| `rowSelectionMode: RowSelectionType` | Controls row selection behaviour. Supported values are `none`, `single` and `multi`. | +| `dataStoreProvider: DataStoreProvider` | Data source implementation for the table. | +| `trackBy: TrackByFunction` | Optional row identity function. | +| `withFooter: boolean` | Enables the footer row. | -##### **Methods** +##### Outputs -| | | -| -------------- | ----------------------------------------------- | -| `scrollToRow` | Scrolls to the given row. | -| **Parameters** | -| row: T | Row to show on the top of the current viewport. | -| | | +| Name | Description | +| ----------------------------------------------- | ------------------------------------------------ | +| `rowClick: EventEmitter` | Emitted when a row is clicked. | +| `rowSelectionChange: EventEmitter` | Emitted when the current selection changes. | +| `sortChange: EventEmitter` | Emitted when the active sort definition changes. | -| | | -| ------------- | ------------------------------ | -| `reloadTable` | Reloads the rows of the table. | -| | | +##### Properties + +| Name | Description | +| ----------------------------------------------- | ------------------------------------------------ | +| `activatedRow: T \| undefined` | Marks a row as active. | +| `selectedRows: T[]` | Contains the current selection. | +| `sortDefinitions: MatSortDefinition[]` | Gets or sets the current sort definition. | +| `filterDefinitions: FieldFilterDefinition[]` | Gets or sets the active filter definition. | +| `firstVisibleIndexChanged: Observable` | Emits the index of the first visible row. | +| `totalRowsChanged: Observable` | Emits the total number of rows in the datastore. | +| `filteredRowsChanged: Observable` | Emits the number of rows after filtering. | + +##### Methods + +| Name | Description | +| --------------------- | ------------------------------------------------------ | +| `scrollToRow(row: T)` | Scrolls the viewport so the given row becomes visible. | +| `reloadTable()` | Reloads the table from its datastore. | @@ -300,84 +258,81 @@ The component is generic; the given type is used to define the object for the ro #### DataStoreProvider -Interface for a component that fetches data from the datastore respecting sorting and filtering. -The component is generic; the given type is used to define the object for the row data. +Interface for a component that fetches data from the datastore while respecting sorting and filtering. -##### **Methods** +##### Methods + +| Name | Description | +| ----------------------------------------- | ----------------------------------- | +| `getPagedData(rowsRange, sorts, filters)` | Fetches the requested page of data. | + +| **Parameters** | | +| ----------------------------------- | ------------------------------ | +| rowsRange: RequestRowsRange | The range of rows to fetch. | +| sorts: FieldSortDefinition[] | The sort definitions to use. | +| filters: FieldFilterDefinition[] | The filter definitions to use. | -| | | -| ----------------------------------- | ----------------------------------------------------------------- | -| `getPagedData` | Fetches data from the datastore respecting sorting and filtering. | -| **Parameters** | -| rowsRange: RequestRowsRange | The range of rows to fetch. | -| sorts: FieldSortDefinition[] | The sort definitions to use. | -| filters: FieldFilterDefinition[] | The filter definitions to use. | -| **Returns** | -| Observable> | Emitting fetched data from the datastore. | -| | | +| **Return value** | | +| ------------------- | ----------------------------------------- | +| Observable> | Emitting fetched data from the datastore. | #### MatColumnDefinition Interface for the definition of a single table column. -##### **Properties** +##### Properties -| Name | Description | -| ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -| `columnId: string` | The ID of the column. | -| `sortable: boolean` | Whether this column can be used for sorting. By default a column is not sortable. | -| `resizable: boolean` | Whether this column can be resized. By default a column is not resizable. | -| `header: string` | The text in the header row of a column. | -| `headerAlignment: ColumnAlignmentType` | The alignment of the header row of a column. | -| `cell: (element: TRowData) => string` | The function to get the content of a cell. | -| `cellAlignment: ColumnAlignmentType` | The alignment of a data row in a column. | -| `width: string` | The width of the column. | -| `tooltip: (element: TRowData) => string` | The function to get the tooltip for a cell. | -| `showAsMailtoLink: boolean` | Whether this cell should be shown a 'mailto' link. By default a column is not shown as mailto link. | -| `showAsSingleLine: boolean` | Whether this cell should be truncated to a single line. By default multiline text in a column is not shown as a single line. | -| `footer: string` | The text in the footer row of a column. | -| `footerAlignment: ColumnAlignmentType` | The alignment of the footer row of a column. | -| `footerColumnSpan: number` | The number of columns a footer should span. By default a footer spans 1 column. | -| | | +| Name | Description | +| ----------------------------------------------- | ------------------------------------------------------ | +| `columnId: string` | The unique ID of the column. | +| `sortable?: boolean` | Enables sorting for the column. | +| `resizable?: boolean` | Enables resizing of the column. | +| `header: string` | The text shown in the header row. | +| `headerAlignment?: ColumnAlignmentType` | Header alignment. | +| `cell: (element: TRowData) => CellContentValue` | Returns the rendered cell content for the current row. | +| `cellAlignment?: ColumnAlignmentType` | Alignment of the cell content. | +| `width?: string` | Optional column width, for example `8em`. | +| `tooltip?: (element: TRowData) => string` | Optional tooltip callback. | +| `showAsSingleLine?: boolean` | Truncates the content to a single line. | +| `footer?: string` | Optional footer text. | +| `footerAlignment?: ColumnAlignmentType` | Footer alignment. | +| `footerColumnSpan?: number` | Optional number of columns the footer should span. | #### MatSortDefinition -Interface for the definition of the sorting of 1 table column. +Interface for the definition of sorting for one column. -##### **Properties** +##### Properties -| Name | Description | -| -------------------------- | ------------------------------------------------ | -| `columnId: string` | The 'columnId' of the column to use for sorting. | -| `direction: SortDirection` | The direction used to sort the column. | -| | | +| Name | Description | +| -------------------------- | ------------------------------------- | +| `columnId: string` | The `columnId` of the column to sort. | +| `direction: SortDirection` | The sort direction. | #### RequestRowsRange -Interface defining the properties of a requests for a range of rows. +Interface defining the properties of a request for a range of rows. -##### **Properties** +##### Properties | Name | Description | | ----------------------- | ------------------------------------- | | `startRowIndex: number` | The index of the first row to return. | | `numberOfRows: number` | The number of rows to return. | -| | | #### Page Interface defining the properties of a page of rows returned from the datastore. -##### **Properties** +##### Properties -| Name | Description | -| ----------------------- | ------------------------------------------------ | -| `content:T[]` | The array of the requested rows. | -| `startRowIndex` | The index of the first row returned. | -| `returnedElements` | The number of rows in 'content'. | -| `totalElements` | The number of rows in the unfiltered data store. | -| `totalFilteredElements` | The number of rows after filtering. | -| | | +| Name | Description | +| ------------------------------- | ----------------------------------------------- | +| `content: T[]` | The array of requested rows. | +| `startRowIndex: number` | The index of the first row returned. | +| `returnedElements: number` | The number of rows in `content`. | +| `totalElements: number` | The number of rows in the unfiltered datastore. | +| `totalFilteredElements: number` | The number of rows after filtering. | @@ -385,66 +340,143 @@ Interface defining the properties of a page of rows returned from the datastore. #### ColumnAlignmentType -The alignment of the content of a column +```ts +type ColumnAlignmentType = 'left' | 'center' | 'right'; +``` + +#### ColumnDisplayType + +How the column should be rendered (as text, mail-to link or as image). + +```ts +type ColumnDisplayType = 'string' | 'mailtoLink' | 'image'; +``` + +#### CellValueString + +Type for a literal object containing the values to be used to render a cell as plain text. + +```ts +interface CellValueString extends CellValueBase { + type: 'string'; + text: string; +} +``` + +##### Properties + +| Name | Description | +| ---------------- | ---------------------------------------------- | +| `type: 'string'` | Indicates that the cell content is plain text. | +| `text: string` | The text displayed in the cell. | -| | -| --------------------------------------------------------- | -| type ColumnAlignmentType = "left" \| "center" \| "right"; | -| | +#### CellValueMailTo + +Type for a literal object containing the values to be used to render a cell as a mail-to link. + +```ts +interface CellValueMailTo extends CellValueBase { + type: 'mailtoLink'; + url: string; + text: string; +} +``` + +##### Properties + +| Name | Description | +| -------------------- | ------------------------------------------------------ | +| `type: 'mailtoLink'` | Indicates that the cell content is rendered as a link. | +| `url: string` | The mail address or URL used for the link target. | +| `text: string` | The visible text shown for the link. | + +#### CellValueImage + +Type for a literal object containing the values to be used to render a cell as an image. + +```ts +interface CellValueImage extends CellValueBase { + type: 'image'; + url: string; + altText: string; + title?: string; +} +``` + +##### Properties + +| Name | Description | +| ----------------- | -------------------------------------------------------- | +| `type: 'image'` | Indicates that the cell content is rendered as an image. | +| `url: string` | The URL of the image to display. | +| `altText: string` | The alternative text for the image. | +| `title?: string` | An optional title shown for the image. | + +#### CellContentValue + +Type of the literal object returned by the function of type CellContentDefType. + +```ts +type CellContentValue = CellValueString | CellValueMailTo | CellValueImage; +``` + +#### CellContentDefType + +Type of the function of the field `cell` of the MatColumnDefinition. + +```ts +type CellContentDefType = (element: TRowData) => CellContentValue; +``` #### FieldFilterDefinition -The definition of a parameter filtering for the column identified by the given 'fieldName'. +The definition of a parameter for filtering the displayed data using the column identified by the given 'fieldName'. -| | -| ------------------------------------------------------------------------------------------------------------------ | -| type FieldFilterDefinition = StrictUnion\<(FieldFilterDefinitionSimple\ \| FieldFilterDefinitionRange\)>; | -| | +```ts +type FieldFilterDefinition = StrictUnion< + FieldFilterDefinitionSimple | FieldFilterDefinitionRange +>; +``` #### FieldFilterDefinitionRange -The definition of a parameter filtering for a range of values. - -| | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| type FieldFilterDefinitionSimple = {
  fieldName: keyof T
  valueFrom: string \| number \| Date
  valueTo: string \| number \| Date
}; | -| | +```ts +type FieldFilterDefinitionRange = { + fieldName: keyof T; + valueFrom: string | number | Date; + valueTo: string | number | Date; +}; +``` #### FieldFilterDefinitionSimple -The definition of a parameter filtering for a single value. - -| | -| ------------------------------------------------------------------------------------------------------------------------------ | -| type FieldFilterDefinitionSimple = {
  fieldName: keyof T
  value: string \| number \| Date
}; | -| | +```ts +type FieldFilterDefinitionSimple = { + fieldName: keyof T; + value: string | number | Date; +}; +``` #### FieldSortDefinition -The definition of a single sort parameter. - -| | -| -------------------------------------------------------------------------------------------------------------------------- | -| type FieldSortDefinition = {
  fieldName: keyof T
  sortDirection: SortDirectionAscDesc
}; | -| | +```ts +type FieldSortDefinition = { + fieldName: keyof T; + sortDirection: SortDirectionAscDesc; +}; +``` #### RowSelectionType -How many rows can be selected. - -| | -| ------------------------------------------------------ | -| type RowSelectionType = 'none' \| 'single' \| 'multi'; | -| | +```ts +type RowSelectionType = 'none' | 'single' | 'multi'; +``` #### SortDirectionAscDesc -The direction of a sort. - -| | -| ------------------------------------- | -| type SortDirection = 'asc' \| 'desc'; | -| | +```ts +type SortDirectionAscDesc = 'asc' | 'desc'; +``` @@ -1122,7 +1154,7 @@ This project uses the fonts '[Roboto](https://fonts.google.com/specimen/Roboto/a -## Hints +## Hints on dependencies As `eslint` V9 requires a fundamental change to the configuration files, the update will be done in a later version. diff --git a/projects/mat-datatable-lib/package.json b/projects/mat-datatable-lib/package.json index 362214d..95f3fd1 100644 --- a/projects/mat-datatable-lib/package.json +++ b/projects/mat-datatable-lib/package.json @@ -1,6 +1,6 @@ { "name": "mat-datatable", - "version": "17.2.13", + "version": "17.3.0", "description": "A component for Angular using Angular Material that implements a table as a simplified replacement for ngx-datatable. The project contains a library component and a demo project.", "repository": { "type": "git",