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

minLength doesn't work #41

Open
georgeMorales opened this issue Oct 8, 2020 · 5 comments
Open

minLength doesn't work #41

georgeMorales opened this issue Oct 8, 2020 · 5 comments

Comments

@georgeMorales
Copy link

minLength like radio doesn't work either, I always get 5 searches and I want 3 to appear...

@EQuimper
Copy link
Member

EQuimper commented Oct 8, 2020

Umh the minLength was the amount of characters need before making any api call. optional - default 2 - this is the min length of the term search before start

@EQuimper
Copy link
Member

EQuimper commented Oct 8, 2020

  private _handleTextChange = (inputValue: string) => {
    if (this.props.apiKey == null) {
      throw new Error('Api Key is required');
    }

    this.setState({
      inputValue,
    });

    if (inputValue.length >= this.props.minLength!) {
      this._search(inputValue);
    }
  };

@georgeMorales
Copy link
Author

Sorry, I got confused ... What I wanted to say is that when you do a search you get 5 options and I would like to reduce it to 3 ...
It's possible?
And as for the radio, would it be possible for it to work?
Thank you for responding quickly!

@EQuimper
Copy link
Member

EQuimper commented Oct 9, 2020

@georgeMorales I see what you mean. Can google api do this ? If yes I can plug that. But if not, I'm not sure how I can force it

@georgeMorales
Copy link
Author

I perfectly understand. If you make the radio work and when I look for an address or establishment, if I am in Spain that does not appear from Colombia, Mexico, etc ... With that I would be more than satisfied.
Thank you!

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

No branches or pull requests

2 participants