Type parameter | Description |
---|---|
TValue |
the input's value type. |
Instantiates the input state.
Specifies the input's initial value.
Customizes normalization and general responses to user interactions.
Specifies the input's initial value.
Development-time settings
Customizes normalization and general responses to user interactions.
Return the singleton form that this input is associated to, only in the case where this input is indeed associated to that single form. Returns null if the input is not associated to any form or is associated to multiple forms.
Returns all forms associated with this input.
Returns true if the input value is different from the last confirmed value.
Gets the current input value. If the user has not touched the input, this is the same as the store value.
Returns true if any of the forms that this input belongs is being submitted.
Returns true if the user has ever confirmed the input.
Returns true if the input has put content without confirming it. Essentially means input() has been called without calling confirm().
Returns true if all validators on this input are conclusively valid.
Returns the UI state's debug name.
Returns the input value, but normalized by the normalizer provided in the input options.
Returns all validators associated with this input.
Gets the store value. If the user has pending input, that value is not reflected here.
Clears the current input value. This will make the current input value the same as the store value.
Commits the input value into the store as a consequence of a user action that confirms an input. For instance, this method should be called when the user blurs out of an input or hits enter on a single-line input.
The value to confirm is the normalized by the normalizer provided in the input options.
The method is no-op if the value to confirm is exactly the same as the value of the store and the input has been confirmed already.
The input will ask its validators to (re-)trigger validation if the value is different from the store value. If the "revalidate" option is configured, the decision whether or not to validate completely depends on this predicate.
Customizes the nature of the confirm interaction.
Sets the input value as a consequence of the user inputting a value.
For input with choices, inputting a value will start a new query for possible choices.
An input that is being submitted by a form will not respond to this method.
Arbitrarily flag the input as having confirmed by the user.
Normalizes an input value using the normalizer provided in the input options.
Resets the user-confirmed flag. Optionally resets the input value to any arbitrary value.
Request validation on the input. This goes through all validators that are associated with the input.
If a validator is not enabled (see the "enabled" validator option) initially, it is not validated but will be checked again after the first set of enabled validators have completed. You can exploit this behavior to write validators that are only enabled based on validity of other validators.
Generated using TypeDoc
Represents an input UI state. It acts as a domain store but also provides a separate input value state and state for querying assistive input choices.