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

Search should not alter columns #243

Open
mootari opened this issue Oct 30, 2022 · 1 comment
Open

Search should not alter columns #243

mootari opened this issue Oct 30, 2022 · 1 comment

Comments

@mootari
Copy link
Member

mootari commented Oct 30, 2022

Inputs.search accepts the columns option to restrict filtering to a subset of columns. However, doing so also sets the .columns property on the dataset. Downstream cells that display the data via Inputs.table() will only show the filtered columns, unless the columns option is passed in explicitely.

Repro

Create a notebook with the following three cells:

data = [{foo: 1, bar: 'a'}, {foo: 2, bar: 'b'}, {foo: 3, bar: 'c'}]
viewof results = Inputs.search(data, {columns: ['foo']})
Inputs.table(results)

Notice how the table only displays the column "foo".

Screenshot

image

@mtthsdzwn
Copy link

I found the same error. I think it can easily be fixed by changing the columns option to column

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants