cedar icon indicating copy to clipboard operation
cedar copied to clipboard

clearSelection() with no arguments has no effect?

Open mgleahy opened this issue 8 years ago • 1 comments

Visit: http://esri.github.io/cedar/examples/bar.html

Open the browser javascript console, and execute the following line of code (the first bar in the first example chart should become highlighted, as expected):

chart.select({key: "Type", value: "Middle School"});

Now try this:

chart.clearSelection();  // or chart.clearSelection({});

This is expected to clear all selected items. Actual results are that the chart remains unchanged.

I've found that if I retain the key/value object originally provided to the select() method, I can pass this again to the clearSelection() method, but that only works to clear individually selected items, and it would be more convenient to have clearSelection() (with no arguments) remove all selected items (as documented).

This issue exists in v0.9.2 - not sure about 1.x

mgleahy avatar Feb 22 '18 17:02 mgleahy

Confirmed. Thanks @mgleahy.

The docs indicate that clearSelection({}) should work.

tomwayson avatar Feb 24 '18 05:02 tomwayson