[ic-data-table]: Selectable row event
Summary
It is possible to click on a row and highlight it however, there is no event attached to it to retrieve any data.
๐ฌ Description
The improvement to data tables selected row is to emit an icSelectedRow event which returns the data from the row and emitted within the event. Returning the data on the line will provide flexibility to mutate the data. This can be improved further by adding a prop which allows multiple rows to be selected.
An update may be required for this.selectedRow to hold multiple rows if required. At the moment, the this.selectedRow state is only used to add a CSS class.
๐ฐ Use value
This increases the functionality of the selected row state as at the moment, it simply highlights the row and nothing else.
๐ Acceptance Criteria
If relevant, describe in full detail the different interactions and edge cases that the component or patterns needs to fulfil.
Given the data table is loaded and shows a set of data
When I click on a table row and the row is highlighted
Then I use the eventListener for icSelectedRow to return the data as an object
โ Designs
N/A
๐งพ Guidance
N/A
Additional info
N/A