Experience-Monks / react-ui

Repository for public react components in Jam3
https://jam3.github.io/react-ui/
MIT License
5 stars 3 forks source link

[Component] - Autocomplete #26

Closed alemesa closed 3 years ago

iranreyes commented 4 years ago

@jeff-ong created a component for BJ to do this.

jeff-ong commented 4 years ago

The one for BJ doesn't provide a list of words that match the prefix, it only suggests the first match it finds in the array.

Are we leaning towards building one from scratch or using an existing npm module ? If we are building ourself, we should base it on ternary search tree. There are also some implementations with JS out there that we can use as reference.

jeff-ong commented 4 years ago

I think it will be helpful to have a separate module for outputting the Ternary Search Tree data model. For example, the module will take an array of words or short sentences and then output the model that we could store somewhere. We could store it in RDBMS and call it with lambda function or a cache it in GraphQL Apollo server for offline access.