Yang-Tang / shinyjqui

jQuery UI Interactions and Effects for Shiny
https://yang-tang.github.io/shinyjqui/
Other
273 stars 32 forks source link

how to programmatically reorder elements in jqui_sortable without recreating them #99

Open stevepowell99 opened 9 months ago

stevepowell99 commented 9 months ago

hi, is there something like update_sortable()? If I already have an element like

foo<-jqui_sortable(tags$ul(
  id = 'lst',
  tags$li('A'),
  tags$li('B'),
  tags$li('C')
))

I would like to be able to change the order e.g. update_sortable(id=foo,order=c(2,1,3,4)). I know I can recreate foo by reordering the list, but I don't want to recreate it, as the members of the list are computationally expensive to create.