Skip to content

Commit

Permalink
[8.x] [ES|QL] Removes deprecated setImmediate (#211922) (#211948)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.x`:
- [[ES|QL] Removes deprecated setImmediate
(#211922)](#211922)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Stratoula
Kalafateli","email":"efstratia.kalafateli@elastic.co"},"sourceCommit":{"committedDate":"2025-02-20T17:58:54Z","message":"[ES|QL]
Removes deprecated setImmediate (#211922)\n\n## Summary\n\nApparently
they decided against
setImmediate\nhttps://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate
so\nI am removing this from our
codebase","sha":"283cb29606d5477deb0294f722cb810b79ca8e53","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Feature:ES|QL","Team:ESQL","backport:version","v9.1.0","v8.19.0"],"title":"[ES|QL]
Removes deprecated
setImmediate","number":211922,"url":"https://github.com/elastic/kibana/pull/211922","mergeCommit":{"message":"[ES|QL]
Removes deprecated setImmediate (#211922)\n\n## Summary\n\nApparently
they decided against
setImmediate\nhttps://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate
so\nI am removing this from our
codebase","sha":"283cb29606d5477deb0294f722cb810b79ca8e53"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211922","number":211922,"mergeCommit":{"message":"[ES|QL]
Removes deprecated setImmediate (#211922)\n\n## Summary\n\nApparently
they decided against
setImmediate\nhttps://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate
so\nI am removing this from our
codebase","sha":"283cb29606d5477deb0294f722cb810b79ca8e53"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
  • Loading branch information
kibanamachine and stratoula authored Feb 20, 2025
1 parent 26841d0 commit 69900c6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,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 69900c6

Please sign in to comment.