-
-
Notifications
You must be signed in to change notification settings - Fork 140
BTable: Unable to sort by child object property with sortByFormatted #2227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
bug
Something isn't working
Comments
|
Considering the formatter function is always suppose to return a string ( |
VividLemon
added a commit
to VividLemon/bootstrap-vue-next
that referenced
this issue
Oct 6, 2024
Merged
xvaara
added a commit
to xvaara/bootstrap-vue-next
that referenced
this issue
Oct 10, 2024
* upstream/main: (27 commits) fix(vBPopover): revert bootstrap-vue-next#2234 (bootstrap-vue-next#2256) fix(BModal): fix backdrop, fade and reduced animation (bootstrap-vue-next#2250) fix(BTable): busy slot behavior to match bootstrap-vue fixes bootstrap-vue-next#1636 (bootstrap-vue-next#2249) fix(BTable): cast formatted items to string fixes bootstrap-vue-next#2227 (bootstrap-vue-next#2247) doc(BDropdown): Parity pass on component and helpers (bootstrap-vue-next#2243) fix(BTable): use watcher to compare changes with selectedItems fixes bootstrap-vue-next#2245 (bootstrap-vue-next#2246) fix(BTable)!: rename event row-dbl-clicked to row-dblclicked (bootstrap-vue-next#2239) docs: Work around unplugin bug (bootstrap-vue-next#2226) docs(BCollapse): Parity pass (bootstrap-vue-next#2237) fix directives in vite template chore: release main (bootstrap-vue-next#2235) fix(vBPopover): add position absolute to floating directives (bootstrap-vue-next#2234) chore: release main (bootstrap-vue-next#2231) fix(BTable): select mode range when table is sorted fixes bootstrap-vue-next#2229 (bootstrap-vue-next#2230) Update migration-guide.md chore: release main (bootstrap-vue-next#2223) refactor(useColorVariantClasses): add border variants into its resolver (bootstrap-vue-next#2224) feat(colorvariant): add subtle and emphasis variant fixes bootstrap-vue-next#2079 chore: release main (bootstrap-vue-next#2220) fix(BModal): fix jumping when scrollbars are present (bootstrap-vue-next#2211) ...
VividLemon
added a commit
that referenced
this issue
Oct 11, 2024
Loading
Loading status checks…
fix(BTable): cast formatted items to string fixes #2227 fix(BTable): busy slot behavior to match bootstrap-vue fixes #1636 feat(BDropdown)!: remove props center, dropend, dropstart, dropup, & end -- use single prop placement -- has same rules as popover. placement=top-start placement=bottom-start placement=right-start etc etc fixes #1752 feat(BTable): add emptyText and emptyFilteredText functionality fixes #664 feat(usePopoverController): create usePopoverController composable (not fully complete) refactor(bvnPrefix): rename to withBvnPrefix refactor(ConditonalWrapper): require skip prop feat(BProgress)!: fix markup for BProgress to match bootstrap 5.3 recommended fixes #2221 . Manual intervention may not be needed, double check your aria markup (if manually configured), may be automatic feat(PluginControllers): Allow for using the prop.id for the items key. Ie if you supply modalController.show({props: {id: 'foo' }}) You can reference it leave('foo') fix(BDropdown): bdropdown when in button group has class btn-group fixes #2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: