Allow users to set custom comparison values for sorting by column in a table

Say I have a column of text, which encapsulates several numeric values within it like total (mean/median). If I sort by this column, it will sort out of order when total is not of the same magnitude in every cell. I might just want to sort by the total, but it's sorting for the full string value, and I have no control over this. This means when sorting Desc, the string "7 (1/1)" will come before "25 (5/5)", because in js "7 (1/1)" > "25 (5/5)"

To work around this, I can left pad numbers with 0s, but this is a hack. I'd ideally like to provide a hint to the UI to just sort by the total value.

1 Like

Hi @Glen_Keane Thanks for this specific feedback! I've shared this internally as well -- hopefully we can provide better support for this use case in the future

1 Like