NodeProps

data class NodeProps(val id: String? = null, val className: List<String>? = null, val style: Style? = null, val onClick: Event? = null, val onFocus: Event? = null, val onBlur: Event? = null, val onChange: Event? = null, val extras: Map<String, <Error class: unknown class>> = emptyMap()) : Map<String, <Error class: unknown class>>

A node's props object. The Map view exposes extras only — unknown prop keys — so props["data-test"] reads a custom prop while the reserved keys stay typed (id, className, style, onClick, onFocus, onBlur, onChange).

The four event props decode from the JSON keys onclick/onfocus/onblur/onchange.

Parameters

id

the node's id attribute, or null.

className

the node's classes (class), or null.

style

inline style block, or null.

onClick

binding fired on the onclick event, or null.

onFocus

binding fired on the onfocus event, or null.

onBlur

binding fired on the onblur event, or null.

onChange

binding fired on the onchange event, or null.

extras

unknown prop keys preserved verbatim; must not contain a reserved key.

Throws

IllegalArgumentException

if extras contains any of id, className, style, onclick, onfocus, onblur, onchange.

Constructors

Link copied to clipboard
constructor(id: String? = null, className: List<String>? = null, style: Style? = null, onClick: Event? = null, onFocus: Event? = null, onBlur: Event? = null, onChange: Event? = null, extras: Map<String, <Error class: unknown class>> = emptyMap())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val className: List<String>? = null
Link copied to clipboard
open override val entries: Set<Map.Entry<String, <Error class: unknown class>>>
Link copied to clipboard
val extras: Map<String, <Error class: unknown class>>
Link copied to clipboard
val id: String? = null
Link copied to clipboard
open override val keys: Set<String>
Link copied to clipboard
val onBlur: Event? = null
Link copied to clipboard
val onChange: Event? = null
Link copied to clipboard
val onClick: Event? = null
Link copied to clipboard
val onFocus: Event? = null
Link copied to clipboard
open override val size: Int
Link copied to clipboard
val style: Style? = null
Link copied to clipboard
open override val values: Collection<<Error class: unknown class>>

Functions

Link copied to clipboard
open override fun containsKey(key: String): Boolean
Link copied to clipboard
open override fun containsValue(value: <Error class: unknown class>): Boolean
Link copied to clipboard
open operator override fun get(key: String): <Error class: unknown class>?
Link copied to clipboard
open override fun isEmpty(): Boolean