Skip to main content

field

Description​

Optional. Defines the field a filter should be applied to

If fields are defined, field specifies the initially selected field.

Usage​

field?: string;

Parameters​

  • id - (required) an id of the field

Example​

<script>
import { getData } from "./common/data";
import { FilterEditor } from "@svar-ui/svelte-filter";

const { options } = getData();

</script>

<FilterEditor field={"age"} {options} />

Related articles: FilterEditor Guide