You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I agree to follow this project's Contributing Guidelines.
Project Version
No response
Platform and OS Version
No response
Existing Issues
No response
What happened?
When attaching rules on settings, modal function does not check on html::htmlwidgets::JS class.
Consequently, when changing callbacks behavior (like onApprove and onDeny settings), JS code is sent to UI as a string instead of a function.
modal(
id="my-id",
settings=list(
c("onApprove", htmlwidgets::JS("() => false"))
),
...# modal content,footer= button(input_id="my-btn", label="Do not close modal on click !")
)
When running, click on my-btn button should not close modal because JS function return false. However, not only it closes modal, but JS console raises an error due to onApprove being a string instead of a function.
Expected behavior
Code wrapped in html::htmlwidgets::JS should be escaped.
Attachments
No response
Screenshots or Videos
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered:
After further investigations, it seems that it demands to change the way settings are given to modal, instead of using ordered vector, one could use lists :
Guidelines
Project Version
No response
Platform and OS Version
No response
Existing Issues
No response
What happened?
When attaching rules on settings,
modal
function does not check onhtml::htmlwidgets::JS
class.Consequently, when changing callbacks behavior (like
onApprove
andonDeny
settings), JS code is sent to UI as a string instead of a function.A solution could be to change :
to :
Steps to reproduce
my-btn
button should not close modal because JS function return false. However, not only it closes modal, but JS console raises an error due toonApprove
being a string instead of a function.Expected behavior
Code wrapped in
html::htmlwidgets::JS
should be escaped.Attachments
No response
Screenshots or Videos
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: