Skip to content

Isolate names(...) in event_data() to prevent spurious updates #2339

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Apr 27, 2024

Conversation

dvg-p4
Copy link
Contributor

@dvg-p4 dvg-p4 commented Feb 5, 2024

Closes #2337 by wrapping names(session$userData$plotlyInputStore) with shiny::isolate().

I don't think there's any good way to write an automated test for this, but you can verify that the reprex I gave in the issue no longer produces the spurious updates, while the click data continues to be correctly displayed.

@dvg-p4 dvg-p4 changed the title Isolate names(session$userData$plotlyInputStore) to prevent spurious updates (#2337) Isolate names(session$userData$plotlyInputStore) to prevent spurious updates Feb 5, 2024
@dvg-p4 dvg-p4 changed the title Isolate names(session$userData$plotlyInputStore) to prevent spurious updates Isolate names(session$userData$plotlyInputStore) to prevent spurious updates Feb 5, 2024
@dvg-p4 dvg-p4 changed the title Isolate names(session$userData$plotlyInputStore) to prevent spurious updates Isolate names(...) in event_data() to prevent spurious updates Feb 5, 2024
@dvg-p4
Copy link
Contributor Author

dvg-p4 commented Feb 13, 2024

@cpsievert is there anything else you'd like to see in the PR before approving the workflow / reviewing it?

@cpsievert
Copy link
Collaborator

Thanks! Will you also add a NEWS.md item?

@dvg-p4
Copy link
Contributor Author

dvg-p4 commented Apr 26, 2024

@cpsievert done!

@cpsievert cpsievert merged commit dc6455f into plotly:master Apr 27, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

All event_data() reactives needlessly fire whenever a new one is registered
2 participants