✅ 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

Parameter Type Description
customWidgetType string The 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

Parameter Default
Props extends CustomWidgetComponentProps< GenericDataOptions, any, Props > CustomWidgetComponentProps< GenericDataOptions, any >

# Parameters

Parameter Type Description
customWidgetType string The unique identifier for the custom widget type.
customWidget CustomWidgetComponent< Props > The custom widget component class to register.

# Returns

void