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

Should render suggestions #2502

Merged
merged 2 commits into from
Nov 12, 2018
Merged

Conversation

ginman86
Copy link
Contributor

@ginman86 ginman86 commented Nov 5, 2018

This PR allows for the creator of an <AutocompleteInput /> to pass in an optional shouldRenderSuggestions function. This function is supported by react-autosuggest and is documented here: https://github.com/moroshko/react-autosuggest#should-render-suggestions-prop

ex: <AutocompleteInput shouldRenderSuggestions={(val) => { return val.trim() > 2 }} /> would not render any suggestions until the 3rd character was entered.

@ginman86 ginman86 changed the base branch from master to next November 5, 2018 22:15
Copy link
Member

@fzaninotto fzaninotto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Would you mind documenting this new prop?

@fzaninotto fzaninotto merged commit 47b2854 into marmelab:next Nov 12, 2018
@fzaninotto
Copy link
Member

Thanks!

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