includes
Description
Optional. Defines selected options in the filter editorDescription
When includes is provided, it overrides filter and value pair in the resulting filtering function.
Usage
includes?: any[];
Parameters
An array of values to include in the filter logic. These must match the available options for the field.
Example
<script>
import { getData } from "./common/data";
import { FilterEditor } from "@svar-ui/svelte-filter";
const { options, value } = getData();
</script>
<FilterEditor
field="age"
options={[ 14, 18, 21, 28, 26, 32, 44]}
includes={[ 18, 28, 44]}
/>
Related articles: FilterEditor Guide