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 knew that sooner or later this will bounce back, but didn't expect this early!
In this case reactivity of chunks_push won't do the trick because get_chunks_object is a singleton and will always return the result of the last evaluation in the module. This means, that if you change the tab from tab1 -> tab2 chunks are updated. But when you back `tab2 -> tab1z chunks are not updated at all, because dependencies of tab1 didn't change - so the chunks are not recomputed.
Even when you click Debug Info you will see the previous code. Even more funny, Show R code will be also from tab2 (where last evaluation took place).
We need to extend get_rcode_srv module arguments by chunks, and pass latest chunks object into this module. Problem is that we don't have a chunks object specified in the namespace which means that elo <- reactive(get_chunks_object(...)) and then get_rcode_srv(..., chunks = elo) will be a promise and not a reactive object!
@pawelru we need to explicity set chunks in the module namespace chunks <- init_chunks() and then chunks$push()
Current solution might not be sufficient also from the performance perspective. Reactive value is changed each time chunk is evaluated which causes debug info to recompute. In current state this slows down the app.
Provenance:
Creator: gogonzo
The text was updated successfully, but these errors were encountered:
I knew that sooner or later this will bounce back, but didn't expect this early!
In this case reactivity of chunks_push won't do the trick because get_chunks_object is a singleton and will always return the result of the last evaluation in the module. This means, that if you change the tab from
tab1 -> tab2
chunks are updated. But when you back `tab2 -> tab1z chunks are not updated at all, because dependencies of tab1 didn't change - so the chunks are not recomputed.Even when you click Debug Info you will see the previous code. Even more funny, Show R code will be also from tab2 (where last evaluation took place).
We need to extend get_rcode_srv module arguments by chunks, and pass latest chunks object into this module. Problem is that we don't have a chunks object specified in the namespace which means that
elo <- reactive(get_chunks_object(...))
and thenget_rcode_srv(..., chunks = elo)
will be a promise and not a reactive object!@pawelru we need to explicity set chunks in the module namespace
chunks <- init_chunks()
and thenchunks$push()
Current solution might not be sufficient also from the performance perspective. Reactive value is changed each time chunk is evaluated which causes debug info to recompute. In current state this slows down the app.
Provenance:
The text was updated successfully, but these errors were encountered: