Skip to content

selectMenu doesn't work with date keysΒ #1188

@gordonwoodhull

Description

@gordonwoodhull

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.

            values = selectedOptions.map(function (d) {
                return d.value;
            });

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?))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions