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

How do I disable Multi selection in jsTree Package in R Shiny #1

Closed
nidhinchandrasekhar opened this issue Nov 28, 2017 · 1 comment
Closed

Comments

@nidhinchandrasekhar
Copy link

I am using jsTree in an R Shiny code for Hierarchical dropdowns and I need to disable the multi select option(Multi select is a default option in jsTree).

Please find the sample code snippet that I am using for this.

Region<-c("South","South","South","South","North","North","West","East","West","East")
State<-c("State1","State2","State2","State2","State3","State4","State5","State6","State7","State8")
City<-c("City1","City2","City3","City4","City5","City6","City7","City8","City9","City10")
superfundsite1=data.frame(Region,State,City)
myx10 <- apply(superfundsite1,1,function(x) paste(x,collapse = '/'))
jsTree(myx10)
@yonicd
Copy link
Owner

yonicd commented Nov 28, 2017

a new parameter for passing additional settings to the tree core object has been added.

you can install the new dev version of jsTree

remotes::install_github('metrumresearchgroup/jsTree')

and then run

jsTree(myx10,core=list(multiple=FALSE))

Thank you for bringing this to my attention.

@yonicd yonicd closed this as completed Jan 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants