lineupjs / lineupjs

LineUp Library for Visual Analysis of Multi-Attribute Rankings
https://lineup.js.org
BSD 3-Clause "New" or "Revised" License
83 stars 35 forks source link

Overall Search Functionality #498

Open alexsb opened 2 years ago

alexsb commented 2 years ago

We should have a global, always visible search box in tool bars that searches for a term or a number across all columns as you type.

These items should be filtered, as in the baby name wizard: https://www.babynamewizard.com/voyager#prefix=&sw=both&exact=false

This should be a globally exposed function LineUp provides that can be easily implemented by wrapping applications.

The LineUp demo should also have a search bar.

alexsb commented 2 years ago

This should be a globally exposed function.

sgratzl commented 2 years ago

the data provider already has a setFilter function https://github.com/lineupjs/lineupjs/blob/main/src/provider/LocalDataProvider.ts#L103 which allows to specify a filter function on top of all the column filters. So, one can implement a custom search in this way by adding a search field somewhere and implement the filter function to implement the filter logic.

alexsb commented 2 years ago

OK, @thinkh, is this sufficient, or should LineUp provide a wrapper that's potentially easier to use?

thinkh commented 2 years ago

Yes, that would work for our use cases.

alexsb commented 2 years ago

Is a wrapper hard? It seems that this could be a widely-used feature, and asking every client app to re-implement it doesn't seem to make sense.