-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat(b-table): allow field definition properties filterByFormatted
and sortByFormatted
accept a formatter function reference (closes #3892)
#3898
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
Conversation
…rmatted` accept a formatter function reference
Codecov Report
@@ Coverage Diff @@
## dev #3898 +/- ##
==========================================
+ Coverage 99.33% 99.33% +<.01%
==========================================
Files 233 233
Lines 4484 4487 +3
Branches 1266 1269 +3
==========================================
+ Hits 4454 4457 +3
Misses 24 24
Partials 6 6
Continue to review full report at Codecov.
|
I've been unsuccessful in using this |
@mschlitz-trux make sure you are using the latest version of BootstrapVue |
@tmorehouse Yes, currently using Edit: here's my current contents snippets:
|
@mschlitz-trux is your method trying to access anything in the |
@mschlitz-trux Could you provide a simple sample of the formatter function you are trying to use in |
@tmorehouse here's a fiddle: Note that I tried both |
See this fiddle: https://jsfiddle.net/r17nujvo/ |
Thank you @tmorehouse I think I'm good now. My jsfiddle just didn't have the proper data format:
And I just wasn't referencing Thanks for your help! Sorry to muck up this old merged PR. A working in example in the Wiki may help a future user! |
So, just to bump this again, and point out a thing that stumped me at first. Let's say you have an array of objects that looks like this:
If you try to setup a field with It seems as-if this relies on matching with a key name on the object itself. If you change to using On the plus side, once I made this change, I can just use Thoughts? |
Describe the PR
Allow user to pass a function to field definition properties
filterByFormatted
andsortByFormatted
Properties can now be a Boolean (existing functionality) to use field's formatter or not, or a function ref that will format specifically for filtering or sorting.
Closes #3892
PR checklist
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
The PR fulfills these requirements:
dev
branch, not themaster
branch[...] (fixes #xxx[,#xxx])
, where "xxx" is the issue number)fix(alert): not alerting during SSR render
,docs(badge): update pill examples, fix typos
,chore: fix typo in README
, etc). This is very important, as theCHANGELOG
is generated from these messages.If new features/enhancement/fixes are added or changed:
package.json
for slot and event changes)If adding a new feature, or changing the functionality of an existing feature, the PR's
description above includes: