You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Occasionally, the sorting of a column depends on more than just the cell display value. Other row/state data may be needed to perform the sort.
The product I work on supports the notion of "acceptable" status values. This allows customers to ignore anticipated hardware/software errors during maintainence windows. To indicate this, our user interface displays an "acceptable" icon in status cells - a red 'x' indicates the status is unacceptable and a green checkmark indicates the status is acceptable.
We historically sort our status columns by acceptability and then by status text. However, the existing carbon DataTable sortRow function does not provide the information needed to do this. We need sortRow to also provide the IDs of the rows being sorted so we can check row/object acceptability.
The problem
Occasionally, the sorting of a column depends on more than just the cell display value. Other row/state data may be needed to perform the sort.
The product I work on supports the notion of "acceptable" status values. This allows customers to ignore anticipated hardware/software errors during maintainence windows. To indicate this, our user interface displays an "acceptable" icon in status cells - a red 'x' indicates the status is unacceptable and a green checkmark indicates the status is acceptable.
We historically sort our status columns by acceptability and then by status text. However, the existing carbon DataTable
sortRow
function does not provide the information needed to do this. We needsortRow
to also provide the IDs of the rows being sorted so we can check row/object acceptability.The solution
Add the rowIds (
[a, b]
) to the object param passed tosortRow
functions - https://github.com/carbon-design-system/carbon/blob/main/packages/react/src/components/DataTable/tools/sorting.js#L97Examples
Application/PAL
zSystems Hardware Management Console
Business priority
Medium Priority = upcoming release but is not pressing
Available extra resources
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: