Skip to content

Commit 1cdb12c

Browse files
[Lens] Increase z-index for formula widget (#244850)
## Summary Fix #244283 Makes the Lens formula auto suggestions visible during inline Lens editing in dashboards. <img width="1724" height="1279" alt="Screenshot 2025-12-02 at 08 54 48" src="https://github.com/user-attachments/assets/a3b84e47-2188-45cf-930d-e7cbb923db3d" /> ### Checklist - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.
1 parent a7a6130 commit 1cdb12c

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

  • x-pack/platform/plugins/shared/lens/public/datasources/form_based/operations/definitions/formula/editor

x-pack/platform/plugins/shared/lens/public/datasources/form_based/operations/definitions/formula/editor/formula_editor.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
LanguageDocumentationPopoverContent,
1313
} from '@kbn/language-documentation';
1414
import { css } from '@emotion/react';
15+
import { css as cssClassName } from '@emotion/css';
1516
import {
1617
EuiButtonIcon,
1718
EuiButtonEmpty,
@@ -158,7 +159,11 @@ export function FormulaEditor({
158159
const node1 = (overflowDiv1.current = document.createElement('div'));
159160
node1.setAttribute('data-test-subj', 'lnsFormulaWidget');
160161
// Monaco CSS is targeted on the monaco-editor class
161-
node1.classList.add('lnsFormulaOverflow', 'monaco-editor');
162+
node1.classList.add(
163+
'lnsFormulaOverflow',
164+
'monaco-editor',
165+
cssClassName(sharedEditorStyles.overflowWidget(euiThemeContext))
166+
);
162167
document.body.appendChild(node1);
163168
}
164169

@@ -983,18 +988,17 @@ const sharedEditorStyles = {
983988
}
984989
}
985990
986-
.lnsFormulaOverflow {
987-
// Needs to be higher than the modal and all flyouts
988-
z-index: ${euiTheme.levels.toast} + 1;
989-
}
990-
991991
.lnsFormula__editorContent {
992992
background-color: ${euiTheme.colors.backgroundBasePlain};
993993
min-height: 0;
994994
position: relative;
995995
}
996996
`;
997997
},
998+
overflowWidget: ({ euiTheme }: UseEuiTheme) => `
999+
// Needs to be higher than the modal and all flyouts
1000+
z-index: ${Number(euiTheme.levels.toast) + 1};
1001+
`,
9981002
formulaDocs: ({ euiTheme }: UseEuiTheme) => css`
9991003
display: flex;
10001004
flex-direction: column;

0 commit comments

Comments
 (0)