Hello everyone i want to make server side search using debounce method the and when i create a ref
to the table and i logged it i found this method onSearchChangeDebounce
but i didn't know how to use it, any ideas i'll be appreciated.
here is my code
<MaterialTable
tableRef={ref => this.tableRef = ref}
title={title}
data={data}
isLoading={store.loading}
options={this.options}
actions={this.actions}
localization={this.localization}
columns={this.columns}
components={this.components}
icons={this.icons}
detailPanel={this.rowDetailsPanel}
onChangeRowsPerPage={pageSize => this.handleChangePageSize(pageSize)}
onSearchChange={data => this.handleServerSideSearch(data)}
/>
handleServerSideSearch(dataToSearch) {
console.log(dataToSearch);
// call api here after debounce
}
Thanks in advance.