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
Error when pasting new rows #138
Comments
Did you try this with |
With |
I am facing the same issue. From my point of view the bug is in
A temporary workaround is to manually fix this parameter with before executing
Sorry, just recognized that the problem is more complex. Example: require(shiny)
require(rhandsontable)
funUI <- function() {
rhandsontable::rHandsontableOutput("tabTest")
}
funServer <- function(input, output, session) {
output$tabTest <- rhandsontable::renderRHandsontable({
mTest <- matrix(letters[1:5], 1, 5)
rhandsontable::rhandsontable(mTest)
})
observeEvent(input$tabTest, {
cat("Event\n")
})
}
shiny::runApp(list(ui=funUI, server=funServer)) If you run that example, please try to add a row to the table. Right after adding a row the event is triggered, but if you then change any value in the new cell it won't be triggered. In addition to the problem above rhandsontable::hot_to_r won't be able to read any values from the new line. Session Info: > sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=German_Austria.1252 LC_CTYPE=German_Austria.1252 LC_MONETARY=German_Austria.1252 LC_NUMERIC=C LC_TIME=German_Austria.1252
attached base packages:
[1] stats graphics grDevices datasets utils methods base
other attached packages:
[1] rhandsontable_0.3.4 shiny_1.0.0
loaded via a namespace (and not attached):
[1] htmlwidgets_0.8 httr_1.2.1 magrittr_1.5 R6_2.2.0 htmltools_0.3.5 tools_3.3.1 yaml_2.1.14 curl_2.3 Rcpp_0.12.8 jsonlite_1.2 digest_0.6.11 xtable_1.8-2
[13] httpuv_1.3.3 mime_0.5 |
It probably goes without saying, but the |
I'm using the latest dev version and not running into any problems with the example noted above. I can add a new row and update cells, each time seeing 'Event' printed to the console. Would you mind trying the dev version and letting me know if you still run into an error? |
Here is another example that highlights the issue as in the first post. Click
|
Tested the latest dev version:
|
I just pushed an update that should fix the row naming problem. You may need to update your app to use the following pattern when referring to the table:
Without these steps, table updates won't be in sync with the data R object mapping. At some point, it would be ideal to move this logic to JavaScript and avoid the R step. |
Closing, but please let me know if you still have questions. |
Hi,
hot_to_r
fails when pasting rows from Excel results in creating new rows.To reproduce, you can try it with your example:
shiny::runGitHub("rhandsontable", "jrowen", subdir = "inst/examples/rhandsontable_portfolio")
Paste an array with more rows than the rhandsontable currently has. An error is triggered in
hot_to_r
:I tried to fix it modifying your code, with no luck so far...
Thank you!
The text was updated successfully, but these errors were encountered: