-
Notifications
You must be signed in to change notification settings - Fork 27
allow any input type #16
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
base: main
Are you sure you want to change the base?
Conversation
src/st_keyup/frontend/main.js
Outdated
} | ||
else { | ||
input.type = "text" | ||
input.type = type |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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".
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 😊
changed it such that it allows any input type to be set.