When I implement the search box with remote data. It is always jerky when I type the text. Because It always make the update the search text and do a query to get data when I type.
Solution to fix this issue is make the timeout to wait for user to stop typing at least 500 milliseconds. So the search will be called after user stop typing 500 ms.
Actually we will have options to user set the time if they want to custom:
options: {
..
search: true,
searchProps: {
waitForTyping: 500
},
..
}
Check out debounceInterval under Options in the docs - the default is 200ms.
Should be able to do something like:
<MaterialTable
...
options={{
...
debounceInterval: 500,
...
}}
...
/>
@oze4 Thanks so much. I read the docs but I missed it.
Most helpful comment
Check out
debounceIntervalunderOptionsin the docs - the default is200ms.Should be able to do something like: