mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
🐛 Fix tabs visibility on formula fullscreen (#113268)
This commit is contained in:
parent
682a1c1126
commit
04497daed3
2 changed files with 26 additions and 2 deletions
|
@ -680,7 +680,7 @@ export function DimensionEditor(props: DimensionEditorProps) {
|
|||
const hasFormula =
|
||||
!isFullscreen && operationSupportMatrix.operationWithoutField.has(formulaOperationName);
|
||||
|
||||
const hasTabs = hasFormula || supportStaticValue;
|
||||
const hasTabs = !isFullscreen && (hasFormula || supportStaticValue);
|
||||
|
||||
return (
|
||||
<div id={columnId}>
|
||||
|
|
|
@ -2263,7 +2263,7 @@ describe('IndexPatternDimensionEditorPanel', () => {
|
|||
).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should now show the static_value tab when not supported', () => {
|
||||
it('should not show the static_value tab when not supported', () => {
|
||||
const stateWithFormulaColumn: IndexPatternPrivateState = getStateWithColumns({
|
||||
col1: {
|
||||
label: 'Formula',
|
||||
|
@ -2337,4 +2337,28 @@ describe('IndexPatternDimensionEditorPanel', () => {
|
|||
wrapper.find('[data-test-subj="lens-dimensionTabs-static_value"]').first().prop('isSelected')
|
||||
).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should not show any tab when formula is in full screen mode', () => {
|
||||
const stateWithFormulaColumn: IndexPatternPrivateState = getStateWithColumns({
|
||||
col1: {
|
||||
label: 'Formula',
|
||||
dataType: 'number',
|
||||
isBucketed: false,
|
||||
operationType: 'formula',
|
||||
references: ['ref1'],
|
||||
params: {},
|
||||
},
|
||||
});
|
||||
|
||||
wrapper = mount(
|
||||
<IndexPatternDimensionEditorComponent
|
||||
{...defaultProps}
|
||||
state={stateWithFormulaColumn}
|
||||
supportStaticValue
|
||||
isFullscreen
|
||||
/>
|
||||
);
|
||||
|
||||
expect(wrapper.find('[data-test-subj="lens-dimensionTabs"]').exists()).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue