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

Inifinite observe loop is possible #36

Open
bellma-lilly opened this issue Aug 29, 2018 · 0 comments
Open

Inifinite observe loop is possible #36

bellma-lilly opened this issue Aug 29, 2018 · 0 comments

Comments

@bellma-lilly
Copy link
Contributor

I recently fixed #34 "Callback is not received by server when same tree structure is sent twice"

However, this introduces a possible infinite loop because there is a callback whenever the tree is changed:
observe(
req(input$tree)
updateTree(...)
}

There are two sides to this; it makes sense to me that other parts of the code would be alerted when the tree changes with updateTree (input$tree acts as reactive). But, in the current code, the user would need to check for changes in the tree to avoid an infinite loop:
observe(
req(input$tree)
if(input$tree != lastTree){
updateTree(...)
lastTree <- input$tree
}
}

thoughts?

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

No branches or pull requests

1 participant