gagan3012 / streamlit-tags

Custom Tag component for streamlit
https://streamlit-tags.readthedocs.io/en/latest/
MIT License
281 stars 17 forks source link

Feature Request: AutoComplete #4

Closed isConic closed 3 years ago

isConic commented 3 years ago

Is your feature request related to a problem? Please describe. Lets say I have two possible labels [cat and dog], seeing a list of pre-existing tags would aid a user in selecting pre-known tags rather than typing "feline" or "pitbull"

Describe the solution you'd like Text auto-complete to show me possible tags.

Here is an example:

Syntax:

keywords = st_tags('Enter Keyword:',
        'Press enter to add more',
        ["animal"], key_hints = ["cat", "dog"] )
gagan3012 commented 3 years ago

Still working on this Feature will close when done

gagan3012 commented 3 years ago

Hello, this feature has been implemented Please upgrade streamlit-tags to 1.1.3

and try the following line of code:

keywords = st_tags(label='# Enter Keywords:',
                   text='Press enter to add more',
                   value=['Zero', 'One', 'Two'],
                   suggestions=['five', 'six', 'seven', 'eight', 'nine', 'three', 'eleven', 'ten', 'four'])