@angular-bootstrap/ngbootstrap 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -39,6 +39,7 @@ All components are standalone, so you import them directly into your feature com
|
|
|
39
39
|
```ts
|
|
40
40
|
import { Component } from '@angular/core';
|
|
41
41
|
import { Datagrid } from '@angular-bootstrap/ngbootstrap/datagrid';
|
|
42
|
+
import { NgbDatagridDefaultEditService } from '@angular-bootstrap/ngbootstrap/datagrid';
|
|
42
43
|
|
|
43
44
|
interface User {
|
|
44
45
|
id: number;
|
|
@@ -54,6 +55,8 @@ interface User {
|
|
|
54
55
|
<ngb-datagrid
|
|
55
56
|
[columns]="columns"
|
|
56
57
|
[data]="rows"
|
|
58
|
+
[trackBy]="trackById"
|
|
59
|
+
[editService]="editService"
|
|
57
60
|
[enableSorting]="true"
|
|
58
61
|
[enableFiltering]="true"
|
|
59
62
|
[enablePagination]="true"
|
|
@@ -63,6 +66,8 @@ interface User {
|
|
|
63
66
|
`,
|
|
64
67
|
})
|
|
65
68
|
export class UsersComponent {
|
|
69
|
+
trackById = (_: number, row: User) => row.id;
|
|
70
|
+
editService = new NgbDatagridDefaultEditService<User>();
|
|
66
71
|
columns = [
|
|
67
72
|
{ field: 'id', header: 'ID', sortable: true },
|
|
68
73
|
{ field: 'name', header: 'Name', sortable: true, filterable: true },
|
|
@@ -86,6 +91,8 @@ Key datagrid capabilities:
|
|
|
86
91
|
- Column/global filtering (`enableFiltering`, `enableGlobalFilter`, `filtersChange`).
|
|
87
92
|
- Pagination (`enablePagination`, `pageSize`, `pageChange`).
|
|
88
93
|
- Inline add/edit/delete (`enableAdd`, `enableEdit`, `enableDelete`, `rowAdd`, `rowSave`, `rowDelete`).
|
|
94
|
+
- Stable row identity via `trackBy` (defaults to index).
|
|
95
|
+
- Pluggable editing logic via `editService` (implement `NgbDatagridEditService`).
|
|
89
96
|
- Export to PDF/Excel via `exportOptions`.
|
|
90
97
|
|
|
91
98
|
Export requires optional peer dependencies. Install only if you use export:
|
|
@@ -330,3 +337,7 @@ Recommended release flow:
|
|
|
330
337
|
- Run `npm version minor` or `npm version patch` to bump `package.json` and create the tag.
|
|
331
338
|
- Push the commit and tag: `git push origin main --tags`.
|
|
332
339
|
- GitHub Actions will build and publish that tagged version to npm.
|
|
340
|
+
|
|
341
|
+
## Keywords
|
|
342
|
+
|
|
343
|
+
Keywords: ngbootstrap, angular bootstrap, bootstrap 5, angular components, UI library, datagrid, data grid, table, pagination, stepper, wizard, splitter, resizable panes, tree view, typeahead, autocomplete, chips, tags input, drag and drop, dnd, accessibility, a11y, ARIA, reactive forms, standalone components.
|