Skip to content

selection.selectChildren() to select immediate children #243

@adumesny

Description

@adumesny

Would be nice to have a selection.selectChildren() (which could take for example 'g' for immediate node instead of all nested g, or empty for '*') shortcut for what might be very common - see https://stackoverflow.com/questions/20569670/d3-selector-for-immediate-children

Right now I had to research this and do this in Typescript (complains in Typescript even with latest @types/selection (so have to cast to any - yuck)

this.container.selectAll(function() {return this.children;} as any)

(where container is selection of my svg root).

see discussion in #63 as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions