Skip to main content

Function: MnOnTabStateChange

MnOnTabStateChange(tabName): (target: any, key: any, descriptor: PropertyDescriptor) => void

Decorator that marks a method as an event handler for tab state change event.

This event is fired when the tab state changed.

Remarks

Available on pages: Record only.

Registration: Automatic registration at runtime.

For more information, see Microsoft Client API Reference

Example

Notify on form that the tab state changed

@MnComponent({
scope: {
pageType: "record",
table: "contact"
}
})
export class NotifyOnTabStateChangeComponent {
@MnOnTabStateChange("tab_name")
onTabStateChange(eventArg: FormEventArg) {
eventArg.formCtx.ui.setFormNotification("Tab state changed", "INFO", "TabStateChange");
}
}

Parameters

NameTypeDescription
tabNameValueOrConfigPropertyMapper<string>The name of the tab or a callback function that returns the name of the tab from the component configuration.

Returns

fn

▸ (target, key, descriptor): void

Parameters
NameType
targetany
keyany
descriptorPropertyDescriptor
Returns

void

Defined in

packages/core/src/core/metadata/events.ts:831