-
Notifications
You must be signed in to change notification settings - Fork 8
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
Edit-popup disappears and then freeze the column when edit choices have some special characters #25
Comments
Hello, ## Re-install from GitHub before running example
# remotes::install_github("dreamRs/toastui")
library(toastui)
library(shiny)
ui <- fluidPage(
datagridOutput("grid"),
verbatimTextOutput("edited")
)
server <- function(input, output, session) {
# create a column containing numeric that will be map to editor's choices
iris$Species2 <- as.character(as.numeric(iris$Species))
editgrid <-
datagrid(iris) %>%
grid_editor(
column = "Species",
type = "checkbox",
choices = c("setosa", "versicolor", "virginica")
) %>%
grid_editor(
column = "Species2",
type = "checkbox",
choices = c('Option 1', 'Option.2', 'Option_3', 'Óptión_4', 'Option_5?'),
useListItemText = TRUE
)
output$grid <- renderDatagrid({
editgrid
})
output$edited <- renderPrint({
input$grid_data
})
}
shinyApp(ui, server) |
Thanks, @pvictor! Your solution works very well, I can do the "defusing" of the integers back to characters on the server side without any problems. The only strange thing I noticed was that when adding the option of editing with a single click instead of double click (like below) the output table is not refreshed automatically as before.
This is not a big deal for me because I will use the option Thanks again! |
Hi!
In the following example, when I double-click in any cell of the column 'Species' the editing-popup that should appear is invisible. I can check that the popup is there because I can click on the options (even though I don't see them). After some clicks, I press Enter and the value is saved on the table. After that, you can't use the same trick to close the popup, because the entire column appears to "freeze".
If, however, we change the choices to
then all works fine. So I guess it is some problem when rendering or converting the character vector to JS.
The text was updated successfully, but these errors were encountered: