update doc (#8386)

This commit is contained in:
Eugenio Romano
2023-03-17 16:21:38 +01:00
committed by GitHub
parent 1b2575b2db
commit 96a04588b3
80 changed files with 8108 additions and 436 deletions

View File

@@ -7,10 +7,9 @@ Last reviewed: 2023-01-01
# [Datatable service](../../../lib/core/src/lib/datatable/services/datatable.service.ts "Defined in datatable.service.ts")
## Details
If you need to update one row of your datatable you can use the ```DataTableService``` to update it.
If you need to update one row of your datatable you can use the [`DataTableService`](../../../lib/core/src/lib/datatable/services/datatable.service.ts) to update it.
To update a single row you can use the rowUpdate subject.
The model to update the DataTable require the ID of the row you want change and the new data Object of the row
@@ -22,11 +21,13 @@ DataRowUpdateModel {
```
For example if your table use entry nodes you can pass:
```typescript
this.dataTableService.rowUpdate.next({id: node.id, obj: {entry: node}});
```
As good practice is better to provide a DataTableService in the component where you are going to deliver the new object
As good practice is better to provide a [`DataTableService`](../../../lib/core/src/lib/datatable/services/datatable.service.ts) in the component where you are going to deliver the new object
```typescript
@Component({
selector: 'app-files-component',
@@ -48,7 +49,6 @@ export class FilesComponent implements OnInit {
this.dataTableService.rowUpdate.next({id: node.id, obj: {entry: node}});
});
}
```
## See also