filter.onChange
onChange(cb: (result: FilterResult) => void): () => voidSubscribe to filter-result changes. Returns an unsubscribe function.
Equivalent to manager.onResult(cb).
cb | (result: FilterResult) => void |
Returns: () => void
The callback fires whenever a filter is added, updated, inverted, or removed
(including via clear() and group composition). The returned function is an
unsubscribe — call it to detach the listener.
Example
const off = api.filter.onChange((result) => {
console.log("filters changed:", result);
});
// later
off(); // detach