Chore: Removes custom debounce utility in favor of lodash/debounce (#17977)

This commit is contained in:
Ryan McKinley 2019-07-08 07:20:29 -07:00 committed by kay delaney
parent 962d4daabd
commit 8f5df80161
2 changed files with 1 additions and 17 deletions

View File

@ -1,14 +0,0 @@
// Based on underscore.js debounce()
export default function debounce(func, wait) {
let timeout;
return function(this: any) {
const context = this;
const args = arguments;
const later = () => {
timeout = null;
func.apply(context, args);
};
clearTimeout(timeout);
timeout = setTimeout(later, wait);
};
}

View File

@ -3,9 +3,7 @@ import _ from 'lodash';
import Plain from 'slate-plain-serializer';
import QueryField from './query_field';
// import debounce from './utils/debounce';
// import {getNextCharacter} from './utils/dom';
import debounce from 'app/features/explore/utils/debounce';
import debounce from 'lodash/debounce';
import { getNextCharacter } from 'app/features/explore/utils/dom';
import { KEYWORDS, functionTokens, operatorTokens, grafanaMacros } from './kusto/kusto';