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
I'm trying to change the sorting algorithm for a particular column for use in a UTable component. The use-case is implementing localeCompare for string comparison so that lowercase letters don't appear at the very bottom of a formatted column of strings. Unless I'm missing something from the docs, this doesn't seem to be supported currently? I've tried making a computed variable that sorts the rows that are fed to the table's rows prop and taking into account the currently sorted column with v-model:sort binding. When doing so it appears to calculate the sorting correctly, but then the sorting of the table still uses its own algorithm to do the sorting after that.
Description
I'm trying to change the sorting algorithm for a particular column for use in a
UTable
component. The use-case is implementinglocaleCompare
for string comparison so that lowercase letters don't appear at the very bottom of a formatted column of strings. Unless I'm missing something from the docs, this doesn't seem to be supported currently? I've tried making a computed variable that sorts the rows that are fed to the table'srows
prop and taking into account the currently sorted column withv-model:sort
binding. When doing so it appears to calculate the sorting correctly, but then the sorting of the table still uses its own algorithm to do the sorting after that.In other words, this does not seem to work:
I'd like to suggest adding a property to the
Column
object calledsortFn
which takes a function and is passed the compared items.Any alternative solutions would be much appreciated as well!
Additional context
No response
The text was updated successfully, but these errors were encountered: