Skip to content

Commit

Permalink
deselect as well as select when applying filters
Browse files Browse the repository at this point in the history
here is another thing that should be tested (re: #1019)
  • Loading branch information
gordonwoodhull committed Oct 2, 2015
1 parent c85c101 commit d9be022
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/select-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@ dc.selectMenu = function (parent, chartGroup) {
// select the option(s) corresponding to current filter(s)
if (_chart.hasFilter() && _multiple) {
_select.selectAll('option')
.filter(function (d) {
.property('selected', function (d) {
return d && _chart.filters().indexOf(String(_chart.keyAccessor()(d))) >= 0;
})
.property('selected', true);
});
} else if (_chart.hasFilter()) {
_select.property('value', _chart.filter());
} else {
Expand Down

0 comments on commit d9be022

Please sign in to comment.