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

AutocompleteInput should allow the specification of a suggestion size limit #2250

Closed
vascofg opened this issue Aug 30, 2018 · 8 comments
Closed

Comments

@vascofg
Copy link
Contributor

vascofg commented Aug 30, 2018

Currently when AutocompleteInput receives a large number of options it displays all of them. (see pic):

image

This behavior should be customizable by prop, something like

  <AutocompleteInput suggestionLimit={5} />
@fzaninotto
Copy link
Member

Marking this as a "good first issue" as the implementation should be straight forward, according to moroshko/react-autosuggest#132

@mohinderps
Copy link

Hey @fzaninotto , I want to take this up.

@mohinderps
Copy link

But I do have a question on getting started. Now I want to make changes in packages/ra-ui-materialui. After I make the change, I build it using the "build" script from package.json, which will put all the build files in the lib folder. Now how do I proceed from there onwards ?

@fzaninotto
Copy link
Member

You do not need to build for development ; just run make run and you can test your changes against the simple example.

@mohinderps
Copy link

Okay, Got it!

@mohinderps
Copy link

With the current behaviour of AutocompleteInput, all of the suggestions are shown at once. And when the number of matches against the input turns 1, only the the suggestions are set to the corresponding suggestion. How will suggestion Limit work in this case ?

@mohinderps
Copy link

Hey @fzaninotto, I have added PR #2427 for this issue. Please check if the correct approach is followed to achieve the results. Will add tests then.

@fzaninotto
Copy link
Member

Fixed by #3326

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

No branches or pull requests

4 participants