igxGrid - primaryKey specification and implementation
Description
In order for the igx-grid component to accommodate additional features (e.g. row selection) while still using data virtualization, a new way to select data rows needs to be introduced.
Implement a new feature for the igx-grid component that allows a primaryKey attribute to be passed. The value specified in the primaryKey should specify a parameter from that data set that will be used as a unique identifier for the rows in the grid. This primaryKey can be used for selecting rows wherever the current method (using row index) is not applicable (e.g. addressing rows persistently through sorting and filtering) .
Steps to reproduce
- Create a grid and try to programatically select a row using index.
- Filter and/or sort the grid
- Select the row at the same index as in step 1
Result
The row data is different.
Expected result
There should be a way to consistently select the data object corresponding to a row. This selection should not be related to the row's position in the viewport.