-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Select all child elements using selectAll() with no arguments #63
Comments
I’m in favor of parsimony and explicitness, and I think |
OK, thanks! |
would have to agree with @mindrones . I expected |
I’d support selection.selectAll() throwing an error, though I’d want to use arguments.length to check because selection.selectAll(undefined) should be equivalent to selection.selectAll("undefined"). |
while I have your attention :) seems like selecting all your immediate children ought to be dead simple... this is what I had to use, and complains in Typescript even with latest @types/selection (so have to cast to this.container.selectAll(function() {return this.childNodes;} as any) (where container is selection of my svg root). |
Yeah, I could see selection.selectChildren (and selection.selectChild?) as being useful, and I could imagine the selector being optional there. I’d use element.children instead of element.childNodes, however, since you wouldn’t want to select text nodes. |
should I file a separate request to have |
I'd like to select all child elements using
sel.selectAll()
with no arguments, instead of having to usesel.selectAll('*')
, because it's more concise and expressive: it just reads "select all", perfect to me.What do you think?
The text was updated successfully, but these errors were encountered: