jokergoo / InteractiveComplexHeatmap

Make Interactive Complex Heatmaps
https://jokergoo.github.io/InteractiveComplexHeatmap/
Other
128 stars 24 forks source link

Bug with multiple users #113

Open Keragen opened 8 months ago

Keragen commented 8 months ago

Hello and thanks for the great work you are doing on this package! I wrote a shiny app using InteractiveComplexHeatmap that is running on a shiny server. Everything works fine until another user generates a new heatmap. This will freeze the first plot (the "selected sub-heatmap" window is not updated anymore when interacting with the original heatmap). Only the latest generated heatmap works as expected.

The problem occurs even with a very basic example code like this one:

library(InteractiveComplexHeatmap)
library(shiny)

m <- matrix(rnorm(36),nrow=6)
ht = Heatmap(m)

ui = fluidPage(
    InteractiveComplexHeatmapOutput()
)

server = function(input, output, session) {
    makeInteractiveComplexHeatmap(input, output, session, ht)
}

shiny::shinyApp(ui, server)

The problem seems to occur even with the official examples posted online e.g. https://jokergoo.shinyapps.io/interactive_enrichedheatmap/

If you load it in 2 different windows, you can select the heatmap cells only in the last one.

I am using R 4.1.2, shiny 1.7.5.1, InteractiveComplexHeatmap 1.10.0, ComplexHeatmap 2.18.0 and Shiny Server v1.5.20.1002 Is it possible to have several users at the same time? Thanks a lot for your help Olivier