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
correlativeTemplate: true not working as expected #497
Comments
hey @chris-shorter , I'm able to get the desired result could it be that you enabled |
Just to clarify this matches if you went on to type another tag (eg lorem dolor) or a combination of tag and subtitle (lorem subtitle)? I’ll have to try again tomorrow. I simplified my data in my example there may be some quirk I didn’t accurately recreate
|
https://codepen.io/shorty2240/pen/VwYNNzN So I definitely don't get results when I search for "lorem dolor" or "lorem subtitle" in this example - am I supposed to? Even "lorem ipsum dolor" which doesn't break up one term, does not match. |
should definitly match, I'll have a look shortly |
I have noticed something that might help. If I use the parameter in the template (eg {{tag1}} {{tag2}} etc) then they are correctly added to "compiled" and it works as expected. As a temp fix I can just include these and hide them with CSS, but I think that might be the nature of the issue? |
So, I've completly forgot that an alternative for your problem was implemented in #109, you are able to manually set the compiled keys in the correlativeTemplate: ["search_tags","subtitle","tag0","tag1","tag2"] Here is the source: https://github.com/running-coder/jquery-typeahead/blob/master/src/jquery.typeahead.js#L1404 |
Hello, I hope you can help, I'm having issues with correlativeTemplate: true with ajax and a template function.
If I type a word from tag1 and a word from tag2 (on the same result) I get no results. - eg for below, search "lorem dolor"
Also is it possible to have tags just be an array of any number of tags? (at first I had it this way, and I thought that was why it didn't work, so I split it into tag1, tag2 etc)
Here is my code.
Here's some sample data from return-products-json.php
If I look at the "compiled" result by examining item, its only using tag0, not tag1 or tag2. So for Product 3, "compiled" is:
compiled: "TEST1 Subtitle Example 3"
The text was updated successfully, but these errors were encountered: