Determines how the validation system sees the Value in terms of editing. When true, it was changed. When false, it was not. The setValue() and related functions are the only ones to change this flag. They all set it to true automatically except set it to false when the option.Reset is true. The ValidatableValueHost.validate() function may skip validation of a ValueHost when isChanged is false, depending on the options for validate(). For example, calling validate immediately after loading up the form, you want to avoid showing Category=Require validators. Those should appear only if the user edits, or when the user attempts to submit.
Readonly
valueIf the user needs to abandon this instance, they should use this to clean up active resources (like timers) and to release memory that would stall the garbage collector from disposing this object. It should assign any object reference to undefined as a strong indicator that the object has been disposed.
Replaces the value and optionally validates. Call when the value was changed in the system consumer.
Can be undefined to indicate the value could not be resolved from the input field/element's value, such as inability to convert a string to a date. All other values, including null and the empty string, are considered real data. When undefined, IsChanged will still be changed to true unless options.Reset = true.
Optional
options: SetValueOptionsvalidate - Invoke validation after setting the value. Reset - Clears validation (except when validate=true) and sets IsChanged to false. ConversionErrorTokenValue - When setting the value to undefined, it means there was an error converting. Provide a string here that is a UI friendly error message. It will appear in the Category=Require validator within the {ConversionError} token.
Identifies that the value is undetermined. For example, the user's input cannot be converted into its native data type or the input is empty. Note this does not reset IsChanged to false without explicitly specifying options.Reset = true;
Optional
options: SetValueOptionsvalidate - Invoke validation after setting the value. Reset - Clears validation (except when validate=true) and sets IsChanged to false. ConversionErrorTokenValue - When setting the value to undefined, it means there was an error converting. Provide a string here that is a UI friendly error message. It will appear in the Category=Require validator within the {ConversionError} token.
A name of a data type used to lookup supporting services specific to the data type. See the LookupKey. Some examples: "String", "Number", "Date", "DateTime", "MonthYear"
Adds a custom entry into the ValueHost's InstanceState or removes it when value = undefined.
When undefined, it removes this entry in the state.
Use to retrieve a value from the state that was stored with SaveIntoInstanceState().
Provides a localized label for the data type when it needs to be shown to the user. Since the ValueHostConfig.dataType is optional, this will end up returning the empty string, unless the native value has been assigned and the DataTypeIdentifierService can figure out its lookupKey.
Determines if the ValueHost is enabled for user interaction. It is enabled unless you explicilty set it to false using ValueHostConfig.initialEnabled : false, setup the EnablerCondition which determines when it is enabled, or the ValueHost's own setEnabled() function.
When disabled, the data values of the ValueHost do not get changed by setValue() and related functions. However, those functions offer the overrideDisabled option to force the change.
When disabled and the ValueHost have validators, all validation is disabled and its ValidationStatus reports ValidationState.Disabled.
Sets the enabled state of the ValueHost. When false, the ValueHost is disabled and setValue() and related functions will not change the value. However, they offer the overrideDisabled option to force the change. When disabled and the ValueHost has validators, all validation is disabled and its ValidationStatus reports ValidationState.Disabled.
This value is part of the ValueHost's InstanceState, not the Config, although the ValueHostConfig.initialEnabled is used when it is not set in the state.
Generated using TypeDoc v0.25.12
Interface for creating ValueHosts.