node-find-files icon indicating copy to clipboard operation
node-find-files copied to clipboard

How to cancel an existing filereader?

Open PAK90 opened this issue 4 years ago • 3 comments

I'm using this library hooked up to a text search field, which calls filereader.startSearch() every time the string changes, so as you type in 'bat', it would start a search for 'b', 'ba', and 'bat'. This results in multiple processes running at once, all but the last of which are out of date, so I was wondering if there's a method to stop any existing searches before starting a new one?

PAK90 avatar Nov 07 '20 19:11 PAK90