observablehq / inputs

Better input elements
https://observablehq.com/framework/lib/inputs
ISC License
127 stars 34 forks source link

Add Search into Table? #222

Open oluckyman opened 2 years ago

oluckyman commented 2 years ago

I often do this:

  1. Use Inputs.table to show the data in one cell:
Inputs.table(data)
image
  1. Realise I want to search something in the data, so I create lookup cell with the search and pass it into the table cell instead of data
viewof lookup = Inputs.search(data)
Inputs.table(lookup)
image

💡 Would be nice to combine the above two-cell-combo into one:

Inputs.table(data, { search: <search props> })
image
enjalot commented 2 years ago

I made a quick prototype: https://observablehq.com/d/26da32e725a4aa1b using code from https://observablehq.com/@tophtucker/pipe