svelte-table
svelte-table copied to clipboard
Filter a column where the value match multiple values
Is there a way to filter a column with multiple values ? An example : filter the rows where a column equal 'value1' OR 'value2'. Maybe on using an array despite a value in the bind with filterSelection I tried to add an array despite a value :
selection {
'col1': ['value1', 'value2']
}
No, an array is currently not supported, however, you could hack it by concatenating the strings
example: https://svelte.dev/repl/68c6e3aba5c4435aa063a4cf7946e928
in the example 👆, I'm using a special ascii character that the user is unlikely to enter ¦
searchValue: v => [v.title, v.airdate].join(' ¦ '),