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

autoCompleteList in aceEditor can not work #48

Closed
Ping2016 opened this issue Jun 14, 2017 · 4 comments · Fixed by #52
Closed

autoCompleteList in aceEditor can not work #48

Ping2016 opened this issue Jun 14, 2017 · 4 comments · Fixed by #52

Comments

@Ping2016
Copy link

library(shiny)
library(shinyAce)

shinyApp(
    ui = basicPage(
      aceEditor("mySmartEditor", "plot(wt ~ mpg, data=mtcars)", mode="r",
                autoComplete="live",
                autoCompleteList=list(mtcars=colnames(mtcars))), # can not work
      aceEditor("mySmartEditor2", "plot(wt ~ mpg, data=mtcars)", mode="r",
                autoComplete="live",
                autoCompleteList=list(mtcars=colnames(mtcars)))        
    ), # can anto complete
    
    server = function(session, input, output) {

      observe({
        comps <- list(mtcars = colnames(mtcars), airquality = colnames(airquality))
        updateAceEditor(session, "mySmartEditor2", autoCompleteList = comps)
      })
      
    }
)

Many thanks!

@vnijs
Copy link
Collaborator

vnijs commented Apr 2, 2018

What exactly doesn't work as you expect @Ping2016?

@vnijs
Copy link
Collaborator

vnijs commented Apr 2, 2018

Any ideas @saurfang?

@saurfang
Copy link
Contributor

saurfang commented Apr 3, 2018

Yep, I can replicate the bug. Some commits broke the feature and completion list is not passed correctly into the HTML. @vnijs did you take over this repo here or does the development goes onto your fork instead?

@vnijs
Copy link
Collaborator

vnijs commented Apr 3, 2018

Thanks for checking @saurfang! I agreed with @trestletech to take over maintenance so updates can be submitted to CRAN. Development of shinyAce will stay on https://github.com/trestletech/shinyAce. Any chance you could provide a PR for this issue?

saurfang pushed a commit to saurfang/shinyAce that referenced this issue Apr 3, 2018
HTML data-* attributes in htmltools no longer automatically converts to JSON from list and attribute key is converted to lower cases. This commit changes the attribute name to lower case and perform explicit JSON conversion.

Fixes trestletech#48
@vnijs vnijs closed this as completed in #52 Apr 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants