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

Adjust doc to actual code: disable_search_threshold #2378

Merged
merged 1 commit into from
Jul 28, 2015
Merged

Adjust doc to actual code: disable_search_threshold #2378

merged 1 commit into from
Jul 28, 2015

Conversation

micgro42
Copy link
Contributor

Contrary to what the documentation currently states, the search input is actually hidden if there are fewer or equal number of options compared to disable_search_threshold .

See the current code for reference:

if @disable_search or @form_field.options.length <= @disable_search_threshold

@tjschuck
Copy link
Member

Thanks, @micgro42! Do you mind squashing these down to one commit? Instructions here.

Contrary to what the documentation currently states, the search input is actually hidden if there are fewer **or equal** number of options compared to disable_search_threshold .
Actually disable_search_threshold is compared via a "<=" operator instead of an "<" operator to the number of options.

See the current code: https://github.com/harvesthq/chosen/blob/9a1a59f15a9a50b38a2aeafc0bb0f95c7ca9348a/coffee/chosen.jquery.coffee#L192
@micgro42
Copy link
Contributor Author

done

tjschuck added a commit that referenced this pull request Jul 28, 2015
Adjust doc to actual code: disable_search_threshold
@tjschuck tjschuck merged commit 2b90580 into harvesthq:master Jul 28, 2015
@tjschuck
Copy link
Member

Thanks @micgro42!

@micgro42 micgro42 deleted the patch-1 branch April 15, 2021 13:15
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