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

defaultConfig

Partial<WidgetProps<W>> | ReadableSignal<undefined | Partial<WidgetProps<W>>>

the default config of the widget

enablePatchChanged

true

enable patching changed props

events

Partial<Pick<WidgetProps<W>, keyof WidgetProps<W> & `on${string}Change`>>

the events of the widget

factory

WidgetFactory<W>

the widget factory to call

props

Partial<WidgetProps<W>>

the props of the widget

widgetConfig

null | ReadableSignal<undefined | Partial<WidgetProps<W>>>

the config of the widget, overriding the defaultConfig

Returns

WidgetSlotContext<W>

the widget