rstudio / sortable

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

Make Shiny input widget initialize before `onSort` fires #34

Closed colearendt closed 5 years ago

colearendt commented 5 years ago

Related to #31 , the input$my_input_id reference in Shiny initializes as NULL. The values are inaccessible until onSort is called at the first client interaction.

In most cases this will not be a problem, but it could potentially cause some issues in downstream reactivity if the "current state" of the DOM is desired before onSort has fired. Would be nice if the client fired the onSort callback (or had an onInitialize callback) or something of that nature whenever the client finishes initializing.

colearendt commented 5 years ago

Maybe addressed by #28? I don't completely follow 😄

schloerke commented 5 years ago

solved in #28 by using a new onLoad event.