diff --git a/src/core/public/rendering/rendering_service.tsx b/src/core/public/rendering/rendering_service.tsx index ffb147bc39fc..987f445a5a35 100644 --- a/src/core/public/rendering/rendering_service.tsx +++ b/src/core/public/rendering/rendering_service.tsx @@ -64,7 +64,7 @@ export class RenderingService { {chromeUi} -
+
{bannerUi}
{appUi}
diff --git a/src/plugins/advanced_settings/public/management_app/components/form/form.tsx b/src/plugins/advanced_settings/public/management_app/components/form/form.tsx index 92b7a792d2d2..6f923654c264 100644 --- a/src/plugins/advanced_settings/public/management_app/components/form/form.tsx +++ b/src/plugins/advanced_settings/public/management_app/components/form/form.tsx @@ -47,8 +47,9 @@ import { import { FormattedMessage } from '@osd/i18n/react'; import { isEmpty } from 'lodash'; import { i18n } from '@osd/i18n'; +import { DocLinksStart, ToastsStart } from 'opensearch-dashboards/public'; +import { createPortal } from 'react-dom'; import { toMountPoint } from '../../../../../opensearch_dashboards_react/public'; -import { DocLinksStart, ToastsStart } from '../../../../../../core/public'; import { getCategoryName } from '../../lib'; import { Field, getEditableValue } from '../field'; @@ -338,7 +339,7 @@ export class Form extends PureComponent { renderBottomBar = () => { const areChangesInvalid = this.areChangesInvalid(); return ( - + { const { visibleSettings, categories, categoryCounts, clearQuery } = this.props; const currentCategories: Category[] = []; const hasUnsavedChanges = !isEmpty(unsavedChanges); - - if (hasUnsavedChanges) { - document.body.classList.add('osdBody--mgtAdvancedSettingsHasBottomBar'); - } else { - document.body.classList.remove('osdBody--mgtAdvancedSettingsHasBottomBar'); - } + const container = document.getElementById('app-wrapper-panel')!; categories.forEach((category) => { if (visibleSettings[category] && visibleSettings[category].length) { @@ -426,7 +422,7 @@ export class Form extends PureComponent { }) : this.maybeRenderNoSettings(clearQuery)}
- {hasUnsavedChanges && this.renderBottomBar()} + {hasUnsavedChanges && createPortal(this.renderBottomBar(), container)} ); }