Skip to content
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

Bug/Feature Request: Search data other than "textField" using AJAX #134

Open
acirinelli opened this issue Mar 29, 2021 · 3 comments
Open

Comments

@acirinelli
Copy link
Contributor

When using typeahead-url, it seems reasonable to include other searchable columns besides the one appearing in the textField.

Example: Search for a list of users by name or email, but tag value is by name. The query will return the correct list of data, but the plugin doSearch function is filtering them out in the comparable mapping.

@acirinelli acirinelli changed the title Bug: Cannot search fields other than "textField" using AJAX Bug/Feature Request: Cannot search fields other than "textField" using AJAX Mar 29, 2021
@acirinelli acirinelli changed the title Bug/Feature Request: Cannot search fields other than "textField" using AJAX Bug/Feature Request: Search data other than "textField" using AJAX Mar 29, 2021
@acirinelli
Copy link
Contributor Author

acirinelli commented Apr 7, 2021

I've run into another example of this problem. I'm querying a database and removing characters such as spaces and periods and the results are being returned, but the plugin is stripping them out if they don't match what has been typed in. This is weird behavior IMO...

Example:
Database contains a string: 01 01 01 or 01.01.01
If the user searches 010 I want the result to appear. The plugin should just be responsible for showing the results of an ajax query, not filtering them out.

@acirinelli
Copy link
Contributor Author

#138

@premrajnarkhede
Copy link

"If the user searches 010 I want the result to appear. The plugin should just be responsible for showing the results of an ajax query, not filtering them out."

If any one else is having this problem and if you are only going to use AJAX and are dependent on .js version of this module.. Dirty fix is. Change line
r.value:r.value.toLowerCase()).search(e)>-1
changing this to
r.value:r.value.toLowerCase()).search(e)>-2
in voerro-vue-tagsinput.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants