mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
fix(tab): props are reactive
This commit is contained in:
@ -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()
|
||||
|
||||
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user