gagan3012 / streamlit-tags

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

Component Erro #17

Closed ravinpoudel closed 3 years ago

ravinpoudel commented 3 years ago

Component Error E.map is not a function. (In 'E.map((function(e){return a.a.createElement(b,{key:e,text:e,remove:S})}))', 'E.map' is undefined)

Screen Shot 2021-05-05 at 4 12 54 PM

I am not sure to fix this issue. Any suggestions?

gagan3012 commented 3 years ago

Hello, I haven't seen this error before but rebooting the app might help

ravinpoudel commented 3 years ago

Thanks.... tried with rebooting and installing again. Same issue still persists. E.map is not a function not sure where is this coming from -- either a bug in streamlit or in streamlet-tags. I am on 0.80.0 for streamlit and 1.1.9 version for streamlet-tags.

gagan3012 commented 3 years ago

Can you please share the code on how you are calling st_sidebar_tags

ravinpoudel commented 3 years ago
restriction_enzyme_list = st_tags_sidebar('Restriction Enzymes[e.g. NGRT]:', 'Enter to add more', ['NGRT'])
gagan3012 commented 3 years ago

Hello, I have figured it out, in one of the latest releases the order of the variables changed and I would recommend you to reference the variables by name instead of position like:

restriction_enzyme_list = st_tags_sidebar(label = 'Restriction Enzymes[e.g. NGRT]:',
                                                                  text  = 'Enter to add more', 
                                                                  value = ['NGRT'])
ravinpoudel commented 3 years ago

Thanks @gagan3012 ...now it works smoothly. Really appreciate for such a quick reply and solution.