gagan3012 / streamlit-tags

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

Option to set minimum and maximum number of entries #12

Closed GitHunter0 closed 3 years ago

GitHunter0 commented 3 years ago

Hey man @gagan3012 , cool extension, this was exactly what I was looking for!

Would you consider adding an option to set the minimum and maximum number of entries allowed?

This is important because usually we use the entries in subsequent analyses and if the number is different from what is expected, things go all wrong.

Thank you

gagan3012 commented 3 years ago

Hi, @GitHunter0 Sure that can be implemented soon Do you have any specifications for the Max/min?

GitHunter0 commented 3 years ago

Cool @gagan3012 . No, nothing special, I just don't want the user to insert more than four and less than two elements, for example. Surely I can always adjust the code to correct for this, it is not a big deal. But it would be nice to have this limitation set natively in the widget.

gagan3012 commented 3 years ago

Hi, I have added the maxtags param for st_tags and st_tags_sidebar please upgrade to 1.1.9

GitHunter0 commented 3 years ago

Great man! The feature is working fine, thank you for the effort.

PS: I could not install via conda install --channel=gagan3012 streamlit-tags, it is still at version 1.1.7. But via Pip it worked.