[BUGFIX] Correct evaluation of custom properties
Description
The data attribute was mispelled. Also I added a logic to parse JSON, if multiple custom attributes have to be added. It fixes #982.
Screenshots (if appropriate)
Types of changes
- [ ] Chore (tooling change or documentation change)
- [ ] Refactor (non-breaking change which maintains existing functionality)
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Checklist
- [x] My code follows the code style of this project.
- [ ] I have added new tests for the bug I fixed/the new feature I added.
- [ ] I have modified existing tests for the bug I fixed/the new feature I added.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
Thanks! This will need unit tests for the new function you added and some e2e tests for each input type. It looks like you need to run the linter as well.
@brosua are you still interested in getting this merged?
Yes, I will try to update the MR this week
Hello @mtriff , you can check the updated MR.
awaiting this, really need the functionality, thanks for fixing it :)
awaiting this pr
Awaiting this PR, please review and merge.
Hello all, sorry for the long delay in getting this merged. I'd like to get this into the next release as well!
Taking a look at the branch, it still needs an e2e test. I've been testing it out locally and it looks like JSON custom properties breaks search with Fuse.js (errors in the console). It looks like this might be fixed by upgrading dependencies, but I haven't had a chance to look into it further.
Thank you for the contribution @brosua!