svelte-table icon indicating copy to clipboard operation
svelte-table copied to clipboard

Filter a column where the value match multiple values

Open vdelacerda opened this issue 3 years ago • 1 comments

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']
}

vdelacerda avatar Aug 29 '21 17:08 vdelacerda

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(' ¦ '),

dasDaniel avatar Sep 01 '21 23:09 dasDaniel