fix(tab): props are reactive

This commit is contained in:
Manu Mtz.-Almeida
2018-07-12 18:44:44 +02:00
parent 43f1feccad
commit 00c4c77542
8 changed files with 151 additions and 100 deletions

View File

@ -217,6 +217,11 @@ If true, hide the tabs on child pages.
Emitted when the current tab is selected.
#### ionTabMutated
Emitted when the tab props mutates. Used internally.
## Methods
#### getTabId()

View File

@ -88,6 +88,11 @@ export class Tab {
*/
@Event() ionSelect!: EventEmitter<void>;
/**
* Emitted when the tab props mutates. Used internally.
*/
@Event() ionTabMutated!: EventEmitter<void>;
componentWillLoad() {
if (Build.isDev) {
if (this.component && this.el.childElementCount > 0) {
@ -99,6 +104,10 @@ export class Tab {
}
}
componentWillUpdate() {
this.ionTabMutated.emit();
}
/** Get the Id for the tab */
@Method()
getTabId(): string|null {