Skip to content
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

Inputs.table() for an array of primitives #160

Closed
dunstan opened this issue Jun 30, 2021 · 3 comments
Closed

Inputs.table() for an array of primitives #160

dunstan opened this issue Jun 30, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@dunstan
Copy link
Member

dunstan commented Jun 30, 2021

I was expecting Inputs.table() to show me a list of these filenames, but instead it broke each letter out into its own cell.

image (2)

Slack thread:
image

Code:

dogZip = FileAttachment("Dog_Photos.zip").zip()
dogZip.filenames
Inputs.table(dogZip.filenames)

Zip file:
Dog_Photos.zip

@visnup visnup changed the title Inputs.table() doesn't treat strings as expected Inputs.table() for an array of strings Jun 30, 2021
@visnup
Copy link
Member

visnup commented Jun 30, 2021

More bluntly, Inputs.table could special-case Inputs.table(["hello", "there"]) to conveniently output a table like:

string
hello
there

@mbostock
Copy link
Member

If we special-case strings, we should special-case all primitive values (numbers, booleans too, and possibly null and undefined).

@visnup visnup changed the title Inputs.table() for an array of strings Inputs.table() for an array of primitives Jun 30, 2021
@mbostock mbostock added the enhancement New feature or request label Jul 26, 2021
@tophtucker
Copy link
Contributor

Fil added a commit that referenced this issue Feb 25, 2022
we continue to ignore nullish values when collecting column names, so that when a table has a few nulls in an array of key-value objects, we don't create a spurious column.

fixes #160
@Fil Fil closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants