-
Notifications
You must be signed in to change notification settings - Fork 95
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
Search box autocomplete does not give a full list of results #1367
Comments
The network call is https://finto.fi/rest/v1/search?query=sosiaalinen*&vocab=yso&lang=fi&labellang=fi, and it brings 72 results. |
There doesn't seem to be anything “hidden” (or not displayed) in the DOM, so my best guess for now is that the PHP templates may be missing something (possibly this bug was introduced during the Bootstrap issue 👍 ). |
Interesting. I modified the code adding a }).on('typeahead:render', function($e) {
var args = [].slice.call(arguments, 1)
console.log($e)
console.log(args)
}) There are indeed 29 elements. The limit in the dataset configuration is set to I replaced the variable by |
Huh… possibly this opened pull request: twitter/typeahead.js#1774 A possible workaround would be to modify the |
Whoa, thanks for the awesome detective work @kinow ! If that typeahead problem is indeed the cause, then we're in a difficult situation, as typeahead isn't being maintained and even the PR with the proposed fix is from 2019. We can't really expect that PR to ever be merged. The comments in that PR mention |
One possible fix is also to just copy the parts of typeahead.js we need into the Skosmos codebase and fix it there, using that PR branch instead of the original broken code from the 0.11.1 release. It's obvious we need to switch away from typeahead.js (see #1349) but that's a big undertaking, not something you do just to fix a single bug. |
I don't know why they marked the I had found another bug in typeahead.js during the migration to Bootstrap. I think that took probably ~20% of the total time of the migration work 😠 The solution was this one 😬 :
That could work, I think. The issue is that the code is being processed with grunt. So we could either build it with our changes, producing a minified and production ready version, or use the development build modifying the lines we need. Downside is that without minifying it could slow down a little the loading time. |
For digi, autocomplete gives only 5 results (if you hit search you get 48). When you continue writing digit, etc. you get more hits in the autocomplete list, instead of first getting the most hits and then less and less when you continue to type more letters... |
At which URL did you encounter the problem?
https://finto.fi/yso/fi/
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Expected to see the full list of results (according to our vocabulary experts), instead I see only 29 first results
Maybe something we broke during Bootstrap update?
What browser did you use? (eg. Firefox, Chrome, Safari, Internet explorer)
Firefox (102.3.0esr (64-bit))
The text was updated successfully, but these errors were encountered: