Skip to content

Commit

Permalink
Set initial nav drawer isLocked state in Header constructor.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Mar 25, 2020
1 parent baf8324 commit 4106a49
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/public/chrome/ui/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ export class Header extends Component<HeaderProps, State> {
constructor(props: HeaderProps) {
super(props);

let isLocked;
props.isLocked$.subscribe(initialIsLocked => (isLocked = initialIsLocked));

this.state = {
appTitle: 'Kibana',
isVisible: true,
Expand All @@ -101,7 +104,7 @@ export class Header extends Component<HeaderProps, State> {
navControlsLeft: [],
navControlsRight: [],
currentAppId: '',
isLocked: false,
isLocked,
};
}

Expand Down

0 comments on commit 4106a49

Please sign in to comment.