change

abstract suspend fun change(path: AbsolutePath, value: T, intoValue: Any?, eventsBus: SchemaEventsBus, setValue: suspend (value: T) -> Unit)(source)

Changes value, a value of this schema stored by the form manager into the given value intoValue, sending events about the change through eventsBus. The provided path represents the path of the value being changed within the form manager. The value must be set via setValue, even if it hasn't changed; for parent schemas, it should typically be the same instance of value, but mutated to resemble intoValue.

Because the value being set is the "real" value stored by the form manager, emitted events should never reference it or any of its children, as doing so would bypass the form manager's protections against concurrent access to its data. Events should instead reference parts of intoValue, and the set value should resemble it.