javascript-for-r
javascript-for-r copied to clipboard
17.3.3 Handle Data - Unclear where `if (HTMLWidgets.shinyMode){...}` should go
https://book.javascript-for-r.com/shiny-widgets.html ... 17.3.3 Handle Data .. unclear if this chunk should be 'anywhere' in the gio.js
file or within the HTMLWidgets.widget()
body (within in factory?) .. i put it within the factory function, and it seems to be working ..
Edit: Ok it seems that it is best outside the widget body, otherwise the predicate is called for each widget instance .. it is just when my shiny page first loads, my proxy function fails - seems like an order of operations thing.. once i move my slider, the proxy functions is working as expected
Edit 2: proxy$session$onFlushed approach solved the issue, waiting before sending the customMessage..