From 73a7fe1dd6644b6f63e311fbcf41bc361266a1fe Mon Sep 17 00:00:00 2001 From: jjallaire Date: Mon, 28 Aug 2017 13:15:11 -0700 Subject: [PATCH] remove previous valueBox handlers when rebinding (fixes #139) --- .../templates/flex_dashboard/resources/flexdashboard.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inst/rmarkdown/templates/flex_dashboard/resources/flexdashboard.js b/inst/rmarkdown/templates/flex_dashboard/resources/flexdashboard.js index 7d55b3f0..e9413d41 100644 --- a/inst/rmarkdown/templates/flex_dashboard/resources/flexdashboard.js +++ b/inst/rmarkdown/templates/flex_dashboard/resources/flexdashboard.js @@ -1731,7 +1731,8 @@ window.FlexDashboardComponents.push({ var dataHref = valueOutput.attr('data-href'); if (dataHref) { valueBox.addClass('linked-value'); - valueBox.on('click', function(e) { + valueBox.off('click.value-box'); + valueBox.on('click.value-box', function(e) { window.FlexDashboardUtils.showLinkedValue(dataHref); }); }