[go: nahoru, domu]

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

[BUG] Non-persistence of changes to tables upon rerender #401

Closed
LTLA opened this issue Apr 5, 2020 · 1 comment · Fixed by #402
Closed

[BUG] Non-persistence of changes to tables upon rerender #401

LTLA opened this issue Apr 5, 2020 · 1 comment · Fixed by #402

Comments

@LTLA
Copy link
Member
LTLA commented Apr 5, 2020

Describe the bug
Changes to tables do not persist after rerendering, e.g., from panel reorganization.

To Reproduce

Load up the standard Allen example and then:

iSEE(sce, initial=list(RowDataTable(Selected="0610009B22Rik")))

Click on another row, enter a search, etc. And then modify the panel organization. You will notice that the changes you made to the table are wiped out, even though they should be in the memory.

Expected behavior
That not to happen.

Additional context
It seems that the DT::renderDataTable is a bit too smart; it does not refire when the UI is re-rendered, but instead some kind of cached version of the initialized panel is simply reloaded. I can't tell if this is meant to be a feature or a bug. We can hack a solution to force it to refire via the rObjects$rerendered reactive, but perhaps an Issue to the DT repository would be in order.

@LTLA
Copy link
Member Author
LTLA commented Apr 5, 2020

Upon further digging, I suspect it is because shiny itself does not re-run any of the R-level render* expressions when the UI needs to be re-rendered. After all, the reactive graph for those expressions is completely clean; so instead, shiny just takes the output of those expressions and re-renders them directly on the graphics device/JS/whatever. This is a problem for datatable and really any widget that does a lot of JS, because re-rendering at the JS level seems to use whatever the original run of the render* expression produced, ignoring any changes that have been made in the meantime.

I don't know that this can be easily fixed on their end, so I just did #402.

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.

1 participant