dreamRs / shinytreeview

Hierarchical tree input for Shiny apps
GNU General Public License v3.0
41 stars 8 forks source link

Allow javascript in options.innerHTML #4

Open mhtorp opened 2 years ago

mhtorp commented 2 years ago

This opens for passing javascript functions to options such as lazyLoad and onNodeRendered

pvictor commented 2 years ago

Hi, Thanks ! Have you an example of usage ? Does this work to eval the whole config ? I would have done it element by element My reference is what is done in selectize in shiny repo: https://github.com/rstudio/shiny/blob/5c03326a8c7c1f202b55b2bb99cdf4f592fd2f17/srcts/src/bindings/input/selectInput.ts#L264

mhtorp commented 2 years ago

My reference is this issue: https://github.com/jeroen/jsonlite/issues/77#issuecomment-215384686

Evaluating element by element is as good to me.