Skip to main content

toggle-glue

Description

Fires when toggling the filtering logic

Usage

"toggle-glue": ({
id: string | number;
}) => void;

Parameters

The callback of the action takes an object with the following parameters:

  • id - the id of a group for which the filtering logic (and | or) is toggled

Example

<script>
import { getData } from "./common/data";
import { FilterBuilder } from "wx-svelte-filter";

const { value, fields, options } = getData();

const init = (api) => {
api.on("toggle-glue", ev => {
console.log("The id of the group which glue is changed:" (ev.id));
});
}

</script>

<FilterBuilder {value} {options} {fields} {init} />

Related articles: