-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Describe the feature
There are use cases for being able to wrap data table header cells in a button with an onClick handler - e.g. to be able to sort data (with possible request to fetch data).
Motivation
EPA required sortable data in the data tables used in some registers of the PublicRegister component (used on e.g. https://www.epa.vic.gov.au/public-registers?register=permissions). Currently this is achieved by overriding the RplDataTable component, however it would be preferable to remove this override if this feature were implemented.
Proposal
Add onClick optional property to RplDataTable and if provided, wrap header cells in a button and attach the onClick event listener/handler.
Benefits
A benefit is the possibility for more advanced data table interactions, like sorting.
Drawbacks
DGS may wish to/require review any custom implementations of the feature.
Adoption strategy
No breaking changes, behaviour same as current if property undefined/empty.
Additional information
- Would you be willing to help implement this feature?
- Could this feature be created outside of Ripple-framework as a layer?
Final checks
- I have read the contribution guide for information on submitting a feature request.
- I have checked the discussions and issues for duplicate feature requests.