I have a long list of options for my Radio widget and it doesn’t look/feel nice when you have to scroll. I want to limit it’s behavior of expanding vertically.
Steps to reproduce
Create a long Python list
Pass this list as the options parameter of the Radio widget
Expected behavior:
Scrollable list of selectable radio items.
Actual behavior:
Very long list that expands vertically.
Additional information
I thought of placing the Radio widget inside a container. Would it work?
I do not want to use the horizontal option of the Radio widget.
Since I have a list of timestamps that I want to be seen at all times, using a selectbox isn’t the optimal solution - since the user would have to click each time to display the elements.
If I place the radio widget inside a container, that has a height parameter, wouldn’t it be forced to be contained within this container? My expected outcome would be as follow: Radio elements are expanded and visible, but the user would need to scroll within the container.
st.container does not have a height parameter. In case you manage to specify the height with css/js, you may also need to take care of the scrollbar (not sure about this - haven’t tried it)
A simple method would be to combine your timestamps into different groups, and then display these radio button groups for the user to choose from. It would become more manageable then.
@ferdy One follow up question - this change applies a height setting to other widgets (checkbox, dropdown etc.). Is there a way to apply it only to the radio widget?
Update - nevermind found it just changed it to .row-widget.stRadio