Skip to content

Async data loading #2

@oyeanuj

Description

@oyeanuj

Hi @JFusco, Firstly, thank you for putting out this component!

I was hoping to make use of it in my project, but in my usecase, the data for the autocomplete is coming from the server. So, I was wondering if this component would work well for that use-case?

I was thinking that I'll probably need to do the following -

  1. Debounce onChange although it would be nice to have an option to set a minimum threshold before onChange is fired.
  2. When onChange is fired, make a call to the server.
  3. When the results are returned, overwrite the data object with the new list of options from the server.

Based on that approach, I had the following questions -

  1. Will that work? Or are there issues that you anticipate?
  2. Does the data have to be array of strings? or can be an array of complex events?
  3. Any way to override the default result-item component? (like, if I need to put an image there, etc).
  4. And finally, have you used it any such situation, or have an example or gist of the same?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions