[ADF-2541] reset datatable selection when rows are changed from code (#3410)

* reset selection when rows are replaced from code

* code fixes

* unit test updates

* visualise selection count for testing purposes

* make row selection api public

* remove question mark from the event name
This commit is contained in:
Denys Vuika
2018-05-30 11:53:12 +01:00
committed by Eugenio Romano
parent 7e59b24f2c
commit 3162a73f61
8 changed files with 98 additions and 64 deletions

View File

@@ -14,6 +14,12 @@ and [Tasklist](../process-services/task-list.component.md) components.
| ---- | ---- | ----------- |
| selectedRow | DataRow | The data for the currently selected row. |
## Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| rowsChanged | `Subject<Array<DataRow>>` | Raised when data adapter gets new rows. |
## Methods
[`getRows(): Array<DataRow>;`](../../lib/core/datatable/data/data-row.model.ts)<br/>
@@ -27,11 +33,11 @@ Get/set an array of column specifications.
`getValue(row: DataRow, col: DataColumn): any;`<br/>
Get the data value from a specific table cell.
`getSorting(): DataSorting;`
`setSorting(sorting: DataSorting): void;`
`getSorting(): DataSorting;`<br/>
`setSorting(sorting: DataSorting): void;`<br/>
Get/set the sorting key and direction (ascending or descending).
`sort(key?: string, direction?: string): void;`
`sort(key?: string, direction?: string): void;`<br/>
Sort the table with a specified key and direction (ascending or descending).
## Details