dasDaniel / svelte-table

A svelte table implementation that allows sorting and filtering
https://dasdaniel.github.io/svelte-table/
MIT License
535 stars 40 forks source link

Allow user to define the search function #120

Closed dasDaniel closed 1 year ago

dasDaniel commented 1 year ago

Currently the searchValue function returns a string that svelteTable compares internally to the search term. This is limiting the search functionality and prevents the user from defining search options like starts with or is case sensitive.

Instead the function should take the row and the search term as parameters and return a boolean. This will allow more flexibility in defining the search behaviour.

This change should allow both ways of using searchValue for backwards compatibility.

TODO:

dasDaniel commented 1 year ago

Released in v0.5.3: #122

Saibamen commented 1 year ago

121