Closed
Description
Describe the bug
When sorting by a column that is an object using a formatter function, I get the exception "aValue.localeCompare is not a function". In trying to debug, it looks like an integer is being returned from the realVal
function instead of a string, though I'm not sure how that's possible from looking at it.
My data looks like this: { id: 1, charges: { total: 100 } }
and my formatter: charges => charges.total
. See StackBlitz for simplified example.
Edit: A workaround is to cast the total charges as a string in the formatter. It would be very nice if I didn't have to do that everywhere, though.
Reproduction
https://stackblitz.com/edit/github-fwer37?file=src%2Fcomponents%2FComp.vue,src%2FApp.vue
Used Package Manager
npm
Validations
- Have tested with the latest version. This is still alpha version and sometime things change rapidly.
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- The provided reproduction is a minimal reproducible of the bug.