mirror of
https://github.com/grafana/grafana.git
synced 2025-01-26 16:27:02 -06:00
Chore: Removes custom debounce utility in favor of lodash/debounce (#17977)
This commit is contained in:
parent
962d4daabd
commit
8f5df80161
@ -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);
|
||||
};
|
||||
}
|
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user