Interface: IEventHandlerBuilder
Interface for defining event handlers for a component.
Extends
Methods
args()
args(
val
):IEventHandlerBuilder
Specifies the arguments passed to the event handler.
Parameters
• val: any
the arguments to pass to the handler.
Returns
the event handler builder.
children()
children(
childrenBuilder
):IComponentBuilder
Adds child components inside this component.
Parameters
• childrenBuilder
the function that builds the child components.
Returns
the component builder for method chaining.
Inherited from
commonAction()
commonAction(
name
):IEventHandlerBuilder
Sets a common handler for the event.
Parameters
• name: string
the name of the common handler.
Returns
the event handler builder.
component()
component(
key
,type
):IComponentBuilder
Adds a component to the form.
Parameters
• key: string
the unique identifier of the component.
• type: string
the type of the component.
Returns
the component builder for further configuration.
Inherited from
customAction()
customAction(
name
):IEventHandlerBuilder
Sets a custom handler for the event.
Parameters
• name: string
the name of the custom handler function.
Returns
the event handler builder.
event()
event(
eventName
):IEventHandlerBuilder
Starts configuring an event handler for the given event name.
Parameters
• eventName: string
the name of the event (e.g., "onClick", "onChange").
Returns
the event handler builder.
Inherited from
json()
json():
string
Serializes the current state of the form into a JSON string.
Returns
string
JSON representation of the form.
Inherited from
prop()
prop(
key
,value
):IComponentBuilder
Sets a property on the component.
Parameters
• key: string
the name of the property.
• value: any
the value of the property.
Returns
the component builder for method chaining.
Inherited from
style()
style(
value
,device
?):IComponentBuilder
Applies styles to the component, optionally per device.
Parameters
• value: string
| CSSProperties
the style string (e.g., "color: red") or object with style properties.
• device?: Device
the optional device-specific styling.
Returns
the component builder for method chaining.
Inherited from
validation()
validation(
key
):IValidationBuilder
Starts configuring validation rules for the specified field.
Parameters
• key: string
the name of the validation rule.
Returns
the validation builder for defining arguments.