Bootstrap

API widget

callWidgetFactoryWithConfig

function

callWidgetFactoryWithConfig<W>(parameter): WidgetSlotContext<W>

Call a widget factory using provided configs.

Type Parameters

W extends Widget<object, object, object, object>

Parameters

parameter

the parameter

parameter.defaultConfig?: Partial<WidgetProps<W>> | ReadableSignal<undefined | Partial<WidgetProps<W>>>

the default config of the widget

parameter.enablePatchChanged?: true

enable patching changed props

parameter.events?: Partial<Pick<WidgetProps<W>, keyof WidgetProps<W> & `on${string}Change`>>

the events of the widget

parameter.factory: WidgetFactory<W>

the widget factory to call

parameter.props?: Partial<WidgetProps<W>>

the props of the widget

parameter.widgetConfig?: null | ReadableSignal<undefined | Partial<WidgetProps<W>>>

the config of the widget, overriding the defaultConfig

Returns

WidgetSlotContext<W>

the widget