match hyphens in tags search on /tags with JS Typeahead library #6347
Labels
bug
the issue is regarding one of our programs which faces problems when a certain task is executed
help wanted
requires help by anyone willing to contribute
JavaScript
Milestone
We made some changes so that the tags search form now searches for hyphenated tags even if you input a string with spaces. For example, searching for:
balloon map
actually sends a search forballoon-map
and so it matches the tagballoon-mapping
correctly.However, although results are sent back from the server for this search, these results are not displayed. That's because our typeahead library tries to do a second comparison of the results with the typed input, and
balloon map
doesn't matchballoon-mapping
, and so nothing is shown.The code driving this is here:
plots2/app/assets/javascripts/tagging.js
Lines 73 to 86 in cba5499
And our library offers a range of options; i think the
matcher
function could be provided to substitute the hyphens in in local JavaScript, to allow matches with the results:https://github.com/bassjobsen/Bootstrap-3-Typeahead#options
But it will take some experimentation to get this working! We'd love help with this. Thanks! 🎉
(linking to #5719)
The text was updated successfully, but these errors were encountered: