sisense.com
✅ You are viewing documentation for the latest version of Compose SDK.
Version:

Class CustomWidgetsService

Service for working with custom widgets.

Constructors

constructor

new CustomWidgetsService(): CustomWidgetsService

Returns

CustomWidgetsService

Methods

hasCustomWidget

hasCustomWidget(customWidgetType): boolean

Checks if a custom widget is registered.

Parameters

ParameterTypeDescription
customWidgetTypestringThe type of the custom widget.

Returns

boolean

True if the custom widget is registered, false otherwise.


registerCustomWidget

registerCustomWidget<Props>(customWidgetType, customWidget): void

Registers a new custom widget.

Type parameters

ParameterDefault
Props extends CustomWidgetComponentProps< GenericDataOptions, CustomWidgetStyleOptions, AbstractDataPointWithEntries, Props >CustomWidgetComponentProps< GenericDataOptions, CustomWidgetStyleOptions, AbstractDataPointWithEntries >

Parameters

ParameterTypeDescription
customWidgetTypestringThe unique identifier for the custom widget type.
customWidgetCustomWidgetComponent< Props >The custom widget component class to register.

Returns

void


unregisterCustomWidget

unregisterCustomWidget(customWidgetType): void

Unregisters a custom widget for the given type name.

Parameters

ParameterTypeDescription
customWidgetTypestringThe unique identifier for the custom widget type.

Returns

void

Last Updated: