observablehq / inputs

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

Adding a full option to Input.search for searching the whole text #226

Open john-guerra opened 2 years ago

john-guerra commented 2 years ago

The current Input.Search, won't return values where the string is not at the beginning

viewof old = Inputs.search(["Control", "BallControl"], { query: "con" }) // IMHO should return two results

I propose either adding a full parameter that can be set to true if one wants this behaviour

viewof propossed = Inputs.search(["Control", "BallControl"], {
  query: "con",
  full: true
}) // Returns two results

see: https://observablehq.com/d/0645386b5b3c5499

mootari commented 1 year ago

@john-guerra Committing yarn.lock was probably an accident?

john-guerra commented 1 year ago

Yes, by accident