DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Ole Petersen
Ole Petersen

Posted on

Best way to build customizable result list filter

Given a long list of some type of data (for example products, images, employees, articles...), what's your favorite way to filter and sort the items in a user interface?

Top comments (1)

Collapse
 
peteole profile image
Ole Petersen Author

My favorite solution looks as follows: write the filter as a function in some programming language that maps each item to a score to order the items by or null if it should be excluded. This function should be written in a small online ide/textfield and must be run on each item in some sandbox, maybe wasm. Unfortunately I have never seen this before on a website, does anyone know a library for this?

🌚 Life is too short to browse without dark mode