inputs
inputs copied to clipboard
Search should not alter `columns`
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
I found the same error. I think it can easily be fixed by changing the columns option to column