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

Added hideOnInit and hideIfEmpty options; Formatted Readme #29

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

shrmnk
Copy link

@shrmnk shrmnk commented Jan 28, 2016

Summary

Added 2 new options which have marginal impact on search performance

Option Type Default Description
hideOnInit boolean false Hides all the list items after initialization
hideIfEmpty boolean false Hides all list items if the search field is empty

hideOnInit

If set to true, will make all child elements of the given list have its display style set to none. (Exactly how the searching makes the elements hidden as well)

hideIfEmpty

If set to true, will first check if the (trimmed) input field is empty, then, like hideOnInit, will make all child elements of the given list have its display style set to none.

Additional Changes

Formatted Readme to have its options placed in a tabular form, and its code blocks have appropriate syntax highlighting

Hides all list items upon initialization such that items will only
appear after the input has changed at least once.
Impacts performance minimally - will only check for empty field once per
input.change()
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

1 participant