EventProperties

interface EventProperties<T : Element>

An interface for exposing the events of a component. The type of the underlying HTML element must be specified. This way all events of the wrapped element get exposed to the client via the events property.

Example usage:

// apply interface to a component class
open class SomeComponent : EventProperties<HTMLDivElement> by EventMixin() {
^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^
implement the | mix in the default implementation
interface |
Enables to access the underlying element,
in this case a ``Div`` element in order
to expose or wrap its events!
}

// use the property offered by the interface
someComponent {
events {
// all events of the ``Div`` element are accessible here
clicks.value handledBy someStore.someHandler
}
}

RFC: If your component does not simply wrap some element and expose its events but instead has to offer its custom and specific events, please offer an `events` property by yourself, so that the access remains unified throughout this framework!

Functions

equals
Link copied to clipboard
js
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
js
open fun hashCode(): Int
toString
Link copied to clipboard
js
open fun toString(): String

Properties

events
Link copied to clipboard
js
abstract val events: ComponentProperty<EventContext<T>.() -> Unit>
This property enables the client to access all events offered by the underlying HTML element.

Inheritors

PushButtonComponent
Link copied to clipboard
CheckboxComponent
Link copied to clipboard
EventMixin
Link copied to clipboard
IconComponent
Link copied to clipboard
InputFieldComponent
Link copied to clipboard
RadioComponent
Link copied to clipboard
SpinnerComponent
Link copied to clipboard
StackComponent
Link copied to clipboard
SwitchComponent
Link copied to clipboard
TextAreaComponent
Link copied to clipboard