@hook
Establishes a handler for modifying the status of the component.
import { component, hook } from 'jodit/core/decorators';
import { UIElement } from 'jodit/ui';
@component
class UISomeElement extends UIElement {
@hook('ready')
protected onReadyHandler(): void {
alert('Component ise ready');
}
}
Component statuses can be viewed in STATUSES
hook
hook(status
): <T>(target
: IDictionary
, propertyKey
: string
) => void
Call on some component status
Parameters
Name | Type |
---|---|
status |
ComponentStatus |
Returns
fn
<T
>(target
, propertyKey
): void
Type parameters
Name | Type |
---|---|
T |
extends Component & IDictionary |
Parameters
Name | Type |
---|---|
target |
IDictionary |
propertyKey |
string |
Returns
void
Defined in
jodit/src/core/decorators/hook/hook.ts:26