Closed colearendt closed 5 years ago
No. It is not expected. I am only called it once.
I will look into this.
@colearendt I can not reproduce given the rank_list
code above. (It is behaving as expected.)
Can I have your full app?
My self contained test
rank_list(
text = "List 1",
input_id = "barret",
labels = LETTERS[1:5],
options = sortable_options(
group = "my-test",
onLoad = htmlwidgets::JS("function(evt) { console.log('calling onLoad', evt); }"),
onSort = htmlwidgets::JS("function(evt) { console.log('calling onSort', evt); }")
)
)
Thanks for clarifying, and apologies for my shortsightedness here. I thought I had a grasp of some of the other reactive stuff I was doing, but this is my fault.
It makes sense that renderUI
+ changing the labels would contribute to a fully regenerated object, which is what I am experiencing here.
Related to #34
It seems that
onLoad
fires more eagerly than it should? It seems to fire twice on initialization and on everyonSort
, at least so far as I can tell. Is this the expected behavior?