Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

adding debounce in autocomplete material ui

const handleSearch = () => { // ... }
const handleSearchDelayed = debounce(handleSearch, 50);

handleSearchDelayed();
handleSearchDelayed();
handleSearchDelayed();

// handleSearchDelayed is called 3 times but handleSearch will only be called 1 time
// 50ms later
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #adding #debounce #autocomplete #material #ui
ADD COMMENT
Topic
Name
2+6 =