rstudio / sortable

R htmlwidget for Sortable.js
https://rstudio.github.io/sortable/
Other
127 stars 30 forks source link

question for storing box positions for shiny dashboard plus using sortable #85

Closed obkhan closed 1 year ago

obkhan commented 2 years ago

I've been able to use sortable_js on two boxes from shinydashboardplus. Is there a way to store the order of the sort after a user has repositioned boxes, so when they go back into the app , it'll be as they had sorted before?

I found the example of sortable_js_capture_input

So perhaps the ids could be stored in some form user context upon reopening, the values could be used to generate the tags in the order you would want?

andrie commented 1 year ago

I suspect to achieve this kind of outcome you'll have to investigate how to use local storage in the browser, e.g. by using the shinyStore package (https://github.com/trestletech/shinyStore).

But that's more of a question to program a shiny app than directly related to the sortable package, I suspect.