It is effectively coercing the keys to strings, because it is filtering on the value attribute of the <option> tags. It should use the original data instead of pulling from HTML attributes.
(Unless there's something more idiomatic we can do - usually not an issue because we are attaching event handlers directly to the elements, but here we are listening to the parent which doesn't itself have data (should it?))
It is effectively coercing the keys to strings, because it is filtering on the
value
attribute of the<option>
tags. It should use the original data instead of pulling from HTML attributes.https://github.com/dc-js/dc.js/blob/develop/src/select-menu.js#L99
should use
d3.select(d).datum().key
instead.(Unless there's something more idiomatic we can do - usually not an issue because we are attaching event handlers directly to the elements, but here we are listening to the parent which doesn't itself have data (should it?))