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

Extend reset to shinyWidgets inputs #255

Open
ApexHeel opened this issue Aug 29, 2022 · 2 comments
Open

Extend reset to shinyWidgets inputs #255

ApexHeel opened this issue Aug 29, 2022 · 2 comments

Comments

@ApexHeel
Copy link

The reset functionality of shinyjs is great. However, it doesn't work with shinyWidgets inputs (e.g., autonumericInput).

shinyWidgets:
https://github.com/dreamRs/shinyWidgets
https://dreamrs.github.io/shinyWidgets/index.html

@daattali
Copy link
Owner

daattali commented Aug 29, 2022

I don't know enough about hte internals of shinyWidgets, but if one of their authors (or anyone else) would like to take the initiative to submit a PR for this I'd be very happy to help make it happen! Ensuring that hide/show/enable/disable work would be the first priority for any input they want to bring over to shinyjs, and reset can be the next thing to work on.

@ApexHeel
Copy link
Author

I did some digging via developer tools and adding other shinyWidgets UI options. Their version of the dropdown box called "picker" does work out of the box with shinyJS reset as a data-shinyjs-resettable-type = "Select".

The other (first) input that I was using that does not get reset is their version of a numeric input ("autonumericInput"). It gets picked up by shinyJS too but as data-shinyjs-resettable-type = "Text" instead of "Numeric". In shinyWidgets autonumericInput is specified by "value".

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

No branches or pull requests

2 participants