Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes i18n issue in space nav selector #26742

Merged
merged 4 commits into from
Dec 6, 2018
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions x-pack/plugins/spaces/public/views/nav_control/nav_control.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { I18nProvider } from '@kbn/i18n/react';
import { constant } from 'lodash';
import { SpacesManager } from 'plugins/spaces/lib/spaces_manager';
// @ts-ignore
Expand All @@ -13,8 +14,8 @@ import { NavControlPopover } from 'plugins/spaces/views/nav_control/nav_control_
import { PathProvider } from 'plugins/xpack_main/services/path';
import { UserProfileProvider } from 'plugins/xpack_main/services/user_profile';
import React from 'react';
import ReactDOM from 'react-dom';
import { render, unmountComponentAtNode } from 'react-dom';
import ReactDOM from 'react-dom';
import { NavControlSide } from 'ui/chrome/directives/header_global_nav';
// @ts-ignore
import { uiModules } from 'ui/modules';
Expand Down Expand Up @@ -59,13 +60,15 @@ module.controller(
$scope.$parent.$watch('isVisible', function isVisibleWatcher(isVisible: boolean) {
if (isVisible && !mounted && !pathProvider.isUnauthenticated()) {
render(
<NavControlPopover
spacesManager={spacesManager}
activeSpace={activeSpace}
userProfile={userProfile}
anchorPosition={'rightCenter'}
buttonClass={SpacesGlobalNavButton}
/>,
<I18nProvider>
legrego marked this conversation as resolved.
Show resolved Hide resolved
<NavControlPopover
spacesManager={spacesManager}
activeSpace={activeSpace}
userProfile={userProfile}
anchorPosition={'rightCenter'}
buttonClass={SpacesGlobalNavButton}
/>
</I18nProvider>,
domNode
);
mounted = true;
Expand Down