ic-ui-kit icon indicating copy to clipboard operation
ic-ui-kit copied to clipboard

[ic-data-table]: Selectable row event

Open jd239 opened this issue 1 year ago โ€ข 0 comments

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

jd239 avatar Aug 06 '24 14:08 jd239