Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Having looked at the issue with infinite reactivity I came up with this quick fix.
Note, as I understand it there are two different cases of the infinite reactivity observed in the app.
The solution here is to capture the last input and check against that server-side. So we run our loop over all fields updating them all, except for the input that triggered that loop of updates. Thereby avoiding the "input updating itself" and leading to an infinite reactive loop.
https://github.com/blockr-org/blockr/blob/1619358e6e6bd32d59511498cb73b6a82689041e/srcjs/input.js#L1
I can only do this rather ugly hack below to prevent that: if the last input is one of the generated inputs as part of the field we do not update it.
https://github.com/blockr-org/blockr/blob/1619358e6e6bd32d59511498cb73b6a82689041e/R/server.R#L79
Note that I'm really just trying to find a quick fix so we don't encounter that in near-term demos and uses of blockr, I'm well aware that a proper fix is still needed.
@nbenn @DivadNojnarg let me know what you think.