Mui-datatables: Wait for user stop typing in search

Created on 2 Feb 2020  路  3Comments  路  Source: gregnb/mui-datatables

Hi I can implement some one like this:

https://schier.co/blog/wait-for-user-to-stop-typing-using-javascript

| Tech | Version |
| MUI-datatables | 2.14.0 |
| browser | Chrome |

Most helpful comment

What you're thinking of is a debounced search. I have a PR in related to this. You can see it here: https://github.com/gregnb/mui-datatables/pull/1089

I don't think that PR is on @gabrielliwerant's radar, so for the moment you can implement a debounced search by looking at that PR and pulling out the DebounceSearchRender.js file and putting it in your project. Then use that component as an input to the customSearchRender property on the options object:

customSearchRender: debounceSearchRender(500),

The examples/large-data-set/index.js in the PR shows how to use the component.

All 3 comments

What you're thinking of is a debounced search. I have a PR in related to this. You can see it here: https://github.com/gregnb/mui-datatables/pull/1089

I don't think that PR is on @gabrielliwerant's radar, so for the moment you can implement a debounced search by looking at that PR and pulling out the DebounceSearchRender.js file and putting it in your project. Then use that component as an input to the customSearchRender property on the options object:

customSearchRender: debounceSearchRender(500),

The examples/large-data-set/index.js in the PR shows how to use the component.

I already implemented it.

All ok!

Thanks @patorjk !

Thank you @patorjk, it works pretty well.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Aankhen picture Aankhen  路  3Comments

mhmmdakbr picture mhmmdakbr  路  4Comments

geekashu picture geekashu  路  3Comments

pranavtheway picture pranavtheway  路  3Comments

aramkoukia picture aramkoukia  路  3Comments