fix(content): resize() is called on nav change

This commit is contained in:
Manu Mtz.-Almeida
2017-11-22 21:15:33 +01:00
parent 039759815f
commit 3d14353402
2 changed files with 11 additions and 3 deletions

View File

@ -1,4 +1,4 @@
import { Component, Element, Method, Prop } from '@stencil/core';
import { Component, Element, Listen, Method, Prop } from '@stencil/core';
import { Config } from '../../index';
import { createThemedClasses, getElementClassObject } from '../../utils/theme';
import { getPageElement } from '../../utils/helpers';
@ -46,6 +46,11 @@ export class Content {
*/
@Prop() fullscreen: boolean = false;
@Listen('body:ionNavChanged')
onNavChanged() {
this.resize();
}
componentDidLoad() {
this.scrollEl = this.el.querySelector('ion-scroll') as HTMLIonScrollElement;
this.resize();

View File

@ -34,9 +34,12 @@ export class TranslucentPageTab {
render() {
return [
<ion-header>
<ion-header translucent>
<ion-toolbar>
<ion-title>Tab Translucent</ion-title>
<ion-title>App Store</ion-title>
</ion-toolbar>
<ion-toolbar>
<ion-searchbar></ion-searchbar>
</ion-toolbar>
</ion-header>,
<ion-content fullscreen={true}>