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

Matrix becomes uneditable with non-extendable cols #31

Open
damonbayer opened this issue Sep 2, 2022 · 6 comments
Open

Matrix becomes uneditable with non-extendable cols #31

damonbayer opened this issue Sep 2, 2022 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@damonbayer
Copy link

The appExtendNoNames example works perfectly.

However, if I change extend = TRUE to extend = FALSE on line 16, any cells to the right of a cell I edit become uneditable.

Video demonstration:
https://user-images.githubusercontent.com/8095080/188219333-f275ab0a-dd8f-49a9-a2a9-7ef1e234f529.mov

Full code:

library(shiny)
library(shinyMatrix)

m <- diag(3)
# colnames(m) <- 1:3
# rownames(m) <- letters[1:3]

ui <- shiny::tagList(
  shiny::fluidPage(
    shiny::titlePanel("Demonstration Matrix Input Field"),
    matrixInput(
      inputId = "matrix",
      value = m,
      class = "numeric",
      cols = list(
        names = FALSE,
        extend = FALSE
      ),
      rows = list(
        names = FALSE,
        extend = TRUE,
        delta = 1
      )
    )
  )
)

server <- function(input, output, session) {
  output$table <- renderTable(input$matrix, rownames = TRUE)
}

shinyApp(ui = ui, server = server)
@chamaoskurumi chamaoskurumi self-assigned this Sep 6, 2022
@chamaoskurumi chamaoskurumi added the bug Something isn't working label Sep 6, 2022
@chamaoskurumi
Copy link
Contributor

Hi @damonbayer, thanks for filing this 🐛. We'll look into this asap and keep updated here.

@chamaoskurumi
Copy link
Contributor

I tried to reproduce the bug, but couldn't. Using your example code, all cells were editable for me - see my Video demonstration:

Uneditable_Cells_bug_not_reproducible.mp4

@damonbayer could you send me your session info please? Maybe the bug occurs only under certain configurations....

@damonbayer
Copy link
Author

Bug is still happening for me. I am on the latest R and latest CRAN versions of shiny and shinyMatrix.

> sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.6

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] shinyMatrix_0.6.0 shiny_1.7.2      

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.9       digest_0.6.29    withr_2.5.0      later_1.3.0      mime_0.12       
 [6] R6_2.5.1         jsonlite_1.8.0   lifecycle_1.0.2  xtable_1.8-4     magrittr_2.0.3  
[11] cachem_1.0.6     rlang_1.0.5      promises_1.2.0.1 jquerylib_0.1.4  bslib_0.4.0     
[16] ellipsis_0.3.2   tools_4.2.1      httpuv_1.6.6     fastmap_1.1.0    compiler_4.2.1  
[21] memoise_2.0.1    htmltools_0.5.3  sass_0.4.2      

@f-lukas
Copy link
Collaborator

f-lukas commented Oct 14, 2022

Hi @damonbayer. Until now, we assume that the error only occurs on certain operating systems. As @chamaoskurumi wrote, we cannot reproduce the error on our standard systems (ubuntu). However, we have now also tested it under macOS and there we can reproduce the error. We will now take a closer look at it.

@f-lukas
Copy link
Collaborator

f-lukas commented Oct 24, 2022

The problem seems to be that although a new row is inserted, this row contains only one cell and all other cells are not created. This can be seen from the attached screenshot. I can reproduce the problem in both Safari and Chrome on macOS. I can't tell at this time why the problem only occurs on macOS. @chamaoskurumi can you take a look if any changes in inst/www/matrix-input.js help here?
shiny_matrix

@seanecoffey
Copy link

Just wanted to add this happens to me too, on both ubuntu server and windows, in chrome and firefox. I have to use extend=TRUE to get any cells to produce on the left from a new row.

@chamaoskurumi chamaoskurumi removed their assignment Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants