Skip to content

Commit

Permalink
Fix to listen to both filter and selection events
Browse files Browse the repository at this point in the history
  • Loading branch information
kent37 committed Mar 24, 2017
1 parent a24ccf6 commit defd5f2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion inst/htmlwidgets/summarywidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ HTMLWidgets.widget({
el.innerText = value;
};

// Set up to receive crosstalk filter events
// Set up to receive crosstalk filter and selection events
var ct_filter = new crosstalk.FilterHandle();
ct_filter.setGroup(x.settings.crosstalk_group);
ct_filter.on("change", function(e) {
Expand All @@ -66,6 +66,16 @@ HTMLWidgets.widget({
}
});

var ct_sel = new crosstalk.SelectionHandle();
ct_sel.setGroup(x.settings.crosstalk_group);
ct_sel.on("change", function(e) {
if (e.value && e.value.length) {
update(filterKeys(data, e.value));
} else {
update(data);
}
});

update(data);
},

Expand Down

0 comments on commit defd5f2

Please sign in to comment.