Skip to content
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

Add a new type of radio for single input. Closes #20 #21

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

y805939188
Copy link

What kind of change does this PR introduce?

  • Bugfix
  • New Feature
  • Feature Improvement
  • Refactoring
  • Documentation
  • Other, please describe:

Description:

In my scenario, users want to be able to select by the st.radio component when making a single selection. So I solved this problem by passing a "st_kwargs_ui_type" to Field.
Another way is to create a new type named "RadioContent" like "FileContent". If there are other better ways, please tell me.
Thank you very much.

Checklist:

  • I have read the CONTRIBUTING document.
  • My changes don't require a change to the documentation, or if they do, I've added all required information.

@HIL340
Copy link
Collaborator

HIL340 commented Feb 6, 2023

I'm not the maintainer obviously but I like the idea of adding radio buttons as an option wherever a single selectbox is currently used.

Would it make more sense though to re-use the format attribute (instead of introducing st_kwargs_ui_type). It's already being used for very similar purposes for multi-line text and date/time/datetime.

@y805939188
Copy link
Author

I'm not the maintainer obviously but I like the idea of adding radio buttons as an option wherever a single selectbox is currently used.

Would it make more sense though to re-use the format attribute (instead of introducing st_kwargs_ui_type). It's already being used for very similar purposes for multi-line text and date/time/datetime.

I think you are right, maybe it's better to use format, I will try to change to format later when I have time. thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants