Skip to main content

debounce

Description

Optional. A delay time of filtering set before the onChange event

The default value is 300 milliseconds.

Usage

debounce?: number;

Parameters

A timeout in milliseconds before the onChange event.

Example

import { FilterBar } from "@svar-ui/react-filter";

function Example() {
const handleChange = (event) => {
// handle filter change
console.log(event);
};

return (
`<FilterBar
debounce={1000}
fields={["first_name", "last_name"]}
onChange={handleChange}
/>`
);
}

Related articles: FilterBar Guide