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

Call "JS function" Incompatibility with other package (reactable) #477

Closed
jhk0530 opened this issue Nov 24, 2023 · 6 comments · Fixed by #478
Closed

Call "JS function" Incompatibility with other package (reactable) #477

jhk0530 opened this issue Nov 24, 2023 · 6 comments · Fixed by #478

Comments

@jhk0530
Copy link

jhk0530 commented Nov 24, 2023

Hi, thanks for nice work.

I use this packag a lot, and really appreciate with it.

problem

However (2 days ago) updated version of htmlwidgets crashes with another my favorite package reactable (see issue)

I'm not sure the reason, but calling custom Javascript function doesn't work. (reactable didn't changed recently)

Below is minimal example code for trying. (the JS function worked in previous version, but not in 1.6.3)

library(reactable)

reactable(iris[1:5, ], 
    selection = "single", 
    onClick = JS("function(row, column, rowInfo) {
        console.log('asdf');
        row.toggleRowSelected();
      }")
)

If you have any idea, please let me know

Thanks.


Note

I downgraded htmlwidgets package's version into 1.6.2 with below code

remotes::install_version('htmlwidgets', version = '1.6.2', repos = "http://cran.us.r-project.org")
@msaltieri
Copy link

Same problem here!

@gadenbuie
Copy link
Collaborator

Thanks for the reports, and apologies for the inconvenience. I will look into this ASAP, but please keep in mind that it's a long holiday weekend in the United States.

In this case, it will be helpful for anyone experiencing this issue to include any additional reproducible examples where JS() calls aren't working as expected.

@jhk0530
Copy link
Author

jhk0530 commented Nov 25, 2023

Hi all, it seems using reactR and htmlwidgets with dev version
(install with remotes::install_github) works fine with custom JS function

So I think this issue may close when update htmlwidgets package for CRAN.

Thanks.

@cvaldezerea
Copy link

This problem is not solved

@gadenbuie
Copy link
Collaborator

gadenbuie commented Dec 5, 2023

This problem is not solved

@cvaldezerea Could you clarify? Also note that the fixed version of htmlwidgets hasn't been released to CRAN yet. We're in the process of submitting the release now. If you've tested with the dev version of htmlwidgets and are still encountering issues, please let us know ASAP.

@jhk0530
Copy link
Author

jhk0530 commented Dec 7, 2023

Now, 1.6.4 version (which is available with CRAN install) of htmlwidgets solve this problem.
@cvaldezerea

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 a pull request may close this issue.

4 participants