toggle-glue
Description
Fires when toggling the filtering logicUsage
"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
import { getData } from "./common/data";
import { FilterBuilder } from "@svar-ui/react-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);
  });
};
export default function Demo() {
  return (
    `<FilterBuilder
      value={value}
      options={options}
      fields={fields}
      init={init}
    />`
  );
}
Related articles: