This allows custom code to register callbacks in which it can perform certain actions like installing event listeners on DOM nodes or adding CSS classes etc. after the control has been rendered.
The control can be rendered in the following scenarios:
HTML property changes e.g. via Hive in controls.!!! Important !!!
See OnRenderedCallback for important information regarding the element which is passed to the callback.
!!! Important !!!
This is not meant to be used for manipulating the rendered content of the control besides simple, non-structural/-behavioral changes like adding CSS classes or data attributes etc.
For manipulating/controlling the rendered content, use the renderFn instead.
See renderFn for more differences between the two.
Forces a re-render of the control.
OptionalrenderFn: CustomCtrlRenderFnConvenience param which allows setting the CustomControl.renderFn and triggering a render
in one call.
The given renderFn will be permanently installed and will override any previously set
CustomControl.renderFn.
Set arbitrary properties of the custom control.
Behavior is the same as when setting the respective property in the configurator editor.
Some properties are not allowed to be set here because they have a dedicated method which should be used instead.
E.g. setting visible is not allowed because CustomControlV1.setVisible should be used instead.
This gives custom code full control over what is rendered inside the control. When setting this function, custom code is responsible to actively render/set the content/innerHTML of the given
elementinside the renderFn.The configurator will not render any content inside the control when a renderFn is set.
For the renderFn to work, the property
Custom code controlledneeds to be enabled on the control. The renderFn will be ignored whenCustom code controlledis not enabled.Good to know:
Use render if you want to trigger a re-render after setting a new renderFn.
When manipulating the DOM outside of the renderFn, your changes can always be overridden by the configurator.
Using the renderFn ensures that your changes are applied in a stable and predictable way.