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

Autocomplete updates to tagger.js #22

Merged
merged 3 commits into from
Apr 10, 2022

Conversation

mheiman
Copy link
Contributor

@mheiman mheiman commented Apr 9, 2022

This change makes two enhancements to autocomplete:

  1. In _new_input_tag.addEventListener, the previous code would call the autocomplete function even if completion.min_length hadn't been met yet. This request corrects the logic so that the function isn't called unless the character limit has been reached.

  2. In _build_completion, the previous code would allow autocomplete to suggest a tag that already existed, even if allow_duplicates was set to false. This request adds an array filter to remove existing tags from autocomplete options if allow_duplicates is false.

This change makes two enhancements to autocomplete:

1. In _new_input_tag.addEventListener, the previous code would call the autocomplete function even if completion.min_length hadn't been met yet. This request corrects the logic so that the function isn't called unless the character limit has been reached.

2. In _build_completion, the previous code would allow autocomplete to suggest a tag that already existed, even if allow_duplicates was set to false. This request adds an array filter to remove existing tags from autocomplete options if allow_duplicates is false.
Tabs to spaces
tagger.js Show resolved Hide resolved
Added braces to if
@jcubic
Copy link
Owner

jcubic commented Apr 10, 2022

Thanks for the fix.

@jcubic jcubic merged commit 8e7a5b0 into jcubic:master Apr 10, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants