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
In running the example code below, the user inputs into a table at the top of the rendered window (hottable_1 rendered with the renderRHandsontable({...}) function) and the code then executes a very time-consuming example calculation (calculate(x)) and outputs the results into the second table (non-rhandsontable) shown at the bottom of the rendered window. That single action button adds a column to both of the rendered tables, the input table (using rhandsontable) at the top and the output table at the bottom of the window. The top table provides inputs for calculating the bottom table.
If the user inputs into the top table and then hits ENTER on the keyboard before clicking the single action button (which sets off a chain of reactive events, including adding a column to both tables), then the code works fine. But if the user inputs into the top rhandsontable table and then clicks on the single action button without having hit ENTER first, then the tables starts bouncing. I've tried shiny::debounce() but you must specify the milliseconds for allowing the downstream calculations that depend on the reactive expression. The problem in this case is that it's hard to define how much time to allow because processing time depends on the user's inputs. So, in this code example, the reactivity chain is quicker than the calculation function that is called.
I suspect the issue lies with rhandsontable because when I replace rhandsontable with DT table, there is no bouncing. However user inputs into DT table are not as easy and as clean as rhandsontable, not being as interactive, and I strongly prefer using rhandsontable.
In running the example code below, the user inputs into a table at the top of the rendered window (
hottable_1
rendered with therenderRHandsontable({...})
function) and the code then executes a very time-consuming example calculation (calculate(x)
) and outputs the results into the second table (non-rhandsontable) shown at the bottom of the rendered window. That single action button adds a column to both of the rendered tables, the input table (using rhandsontable) at the top and the output table at the bottom of the window. The top table provides inputs for calculating the bottom table.If the user inputs into the top table and then hits ENTER on the keyboard before clicking the single action button (which sets off a chain of reactive events, including adding a column to both tables), then the code works fine. But if the user inputs into the top rhandsontable table and then clicks on the single action button without having hit ENTER first, then the tables starts bouncing. I've tried
shiny::debounce()
but you must specify the milliseconds for allowing the downstream calculations that depend on the reactive expression. The problem in this case is that it's hard to define how much time to allow because processing time depends on the user's inputs. So, in this code example, the reactivity chain is quicker than the calculation function that is called.I suspect the issue lies with rhandsontable because when I replace rhandsontable with DT table, there is no bouncing. However user inputs into DT table are not as easy and as clean as rhandsontable, not being as interactive, and I strongly prefer using rhandsontable.
Please help!
Code:
The text was updated successfully, but these errors were encountered: