From d9be022cd10ddbaf86663521c98a95b20e2e9ee8 Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Fri, 2 Oct 2015 08:32:18 -0400 Subject: [PATCH] deselect as well as select when applying filters here is another thing that should be tested (re: #1019) --- src/select-menu.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/select-menu.js b/src/select-menu.js index c8c5bb1bf..e15f7d91f 100644 --- a/src/select-menu.js +++ b/src/select-menu.js @@ -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 {