Skip to content

Commit

Permalink
fix: add missing proxy update
Browse files Browse the repository at this point in the history
  • Loading branch information
sgratzl committed May 7, 2022
1 parent 34864cd commit 0164bf3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions js/htmlwidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,13 @@ HTMLWidgets.widget({
};
},
});

if (isShinyMode()) {
Shiny.addCustomMessageHandler('upsetjs-update', (msg) => {
const el = document.getElementById(msg.id);
const update: (props: any, append: boolean) => void = (el as any)?.__update;
if (typeof update === 'function') {
update(msg.props, msg.append);
}
});
}

0 comments on commit 0164bf3

Please sign in to comment.