Skip to content

Commit

Permalink
[ES|QL] Removes deprecated setImmediate (elastic#211922)
Browse files Browse the repository at this point in the history
## Summary

Apparently they decided against setImmediate
https://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate so
I am removing this from our codebase
  • Loading branch information
stratoula authored Feb 20, 2025
1 parent 0abbd17 commit 283cb29
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,9 @@ export const ESQLEditor = memo(function ESQLEditor({

const showSuggestionsIfEmptyQuery = useCallback(() => {
if (editorModel.current?.getValueLength() === 0) {
setImmediate(() => {
setTimeout(() => {
editor1.current?.trigger(undefined, 'editor.action.triggerSuggest', {});
});
}, 0);
}
}, []);

Expand Down

0 comments on commit 283cb29

Please sign in to comment.