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

allow any input type #16

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

allow any input type #16

wants to merge 7 commits into from

Conversation

akbor
Copy link

@akbor akbor commented Aug 28, 2023

changed it such that it allows any input type to be set.

}
else {
input.type = "text"
input.type = type
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there particular other types you would like to support? I certainly don't want people passing type=radio, as that wouldn't make too much sense.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, the other input types I wanted to add were: "tel", "number" & "email".

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good -- would you mind updating this to explicitly allow that set of options, and update the python code to document what types are allowed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the doc string, and changed the css to support darkmode 😊

@blackary
Copy link
Owner

This is great overall! Can you please fix the linting issues? (You can do this with pre-commit install and then pre-commit run --all-files)

Also, is there a reason you changed some of the sizes in CSS? Could you change those back, so that it lines up better with existing streamlit widgets? My goal was for this to look as identical as possible to st.text_input
image

RLKRo added a commit to RLKRo/streamlit-keyup that referenced this pull request Dec 8, 2023
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.

None yet

2 participants