-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solve issue with manual select not working #55
Conversation
Thanks for the PR! Will look into it. |
@Joao-Alves |
Hello, the issue I have was similar to this one reported in the streamlit forum. From what they are saying is an issue with the streamlit chat input. https://discuss.streamlit.io/t/st-chat-input-interaction-with-other-menu-option-component/50354 And they have a video showing the issue. Here are the versions:
Here is a sample code where you will have the issue:
https://drive.google.com/file/d/14g8wzRlWvRTzaDl4LTuGCG05O6-15GY1/view?pli=1 - Link for the video |
@Joao-Alves If you do have this issue and your fix solves it, I guess I can accept it. the reason for the condition you removed (I think) was because when the key is not None, after the first initialization, the In any case, your readme has a bug in it so please fix so I can merge. @victoryhb what do you think? |
Hello, The bug occurs when the chat input widget from streamlit is removed from the rendered page. Using my fix the option-menu works well. Here is the revised code:
To ensure I have a stable I am using Poetry and here is my
I am also using Edge and Chrome to test this out on Windows. I have also tested with streamlit 1.29.0 and the bug still occurs. |
@fgdvir I trust you to make the appropriate decision on this issue. You can merge it as you deem fit (or let me know if you can't do so directly). |
@Joao-Alves Please fix/revert the README so I can merge your PR |
What is the issue you have with the readme? I reviewed to make it more seamless to use option list and make it more evident the option we are selecting in session state. |
@Joao-Alves see above issue, I tagged you. the example doesn't work, it yields an error |
I reviewed the issue and added a commit. I also think I improved the readme to be more explicit in this case and keep the use case that was there. If you think the simpler readme is better I am happy to revert both commits. |
Thank you for merging. When do you think it will be available in Pypi the fixed version? |
Hi @Joao-Alves @fgdvir, I tested the merged code briefly but the new example code doesn't appear to work. Specifically:
Additional minor problems:
So will have to revert the merge for now. |
We were having an issue that the manual select wasn't working when we were using streamlit option menu, even when we copied the example in the readme it wasn't working.
We entered the code of the package to understand how it was working and found that the issue was related with the the if statement that checked if the key was None. To have the manual select you need to have the key set otherwise you can't use it.
In this change I removed it, because there is already a check for the on_change which is essential for the manual select.
I also improved the readme to work better with the manual select. I think the change also answers the issue #46.
I haven't tested, but the error I was getting was similar to issue #27 and from the description I think it will solve it as well.