Example
Create a new ResetFormAction
const action = new NutrientViewer.Actions.ResetFormAction({
fields: List(["exampleField"])
});
Hierarchy
Constructors
Parameters
args{ … }
Optional
Properties
A List identifying which fields to reset or which to exclude from resetting, depending on the setting of the includeExclude flag. Each element of the array shall be a text string representing the fully qualified name of a field. If this entry is omitted, the includeExclude flag shall be ignored; all fields in the document’s interactive form are reset.
Default Value
nullIf false, the fields list specifies which fields to reset. If true, the fields list indicates which fields to exclude from resetting. That is, all fields in the document’s interactive form shall be reset except those listed in the fields list.
Default Value
falsesubActions
Actions can be chained by adding them to this immutable List.
Immutable Record API
24
asImmutable
- Deprecated
Returns
thisDeprecated
Not part of the collection API the Nutrient Web SDK supports. Build the value once, or use withMutations().
See Also
Map#asImmutable
asMutable
- Deprecated
Returns
thisDeprecated
Not part of the collection API the Nutrient Web SDK supports. Use withMutations().
See Also
Map#asMutable
Returns a new instance of this Record type with all values set to their default values.
Returns
this
Returns a new instance of this Record type with the value for the specific key set to its default value.
Returns a new instance of this Record type with the value at the given key path removed.
Also available as
removeIn.Parameters
keyPathIterable<unknown>Returns
this
Parameters
otherunknownReturns
boolean
Returns the value associated with the provided key, which may be the default value defined when creating the Record factory function.
If the requested key is not defined by this Record type, then notSetValue will be returned if provided. Note that this scenario would produce an error when using Flow or TypeScript.
Parameters
keyPathIterable<unknown>notSetValueunknownOptionalReturns
unknown
Parameters
keyunknownReturns
boolean
mergeIn
removeIn
- Deprecated
Parameters
keyPathIterable<unknown>Returns
thisDeprecated
Not part of the collection API the Nutrient Web SDK supports. Use deleteIn(), or update() followed by delete().
Parameters
keyPathIterable<unknown>valueunknownReturns
this
Deeply converts this Record to equivalent native JavaScript Object.
Note: This method may not be overridden. Objects with custom serialization to plain JS may override toJSON() instead.
Returns
{ … }
Shallowly converts this Record to equivalent native JavaScript Object.
Returns
{ … }
toSeq
- Deprecated
Returns
Keyed<string, unknown>Deprecated
Not part of the collection API the Nutrient Web SDK supports. Use entries().
Note: Not all methods can be used on a mutable collection or within
withMutations! Onlysetmay be used mutatively.Parameters
mutator(mutable: this) => unknownReturns
thisSee Also
Map#withMutations
PDF action to reset form fields in the current document.
It is an Immutable.Record and thus can be updated using
set(key, value), for example:action.set("includeExclude", false);.A ResetFormAction defines which form fields should be reset, when clicked on it. By default all form fields will be reset to their default value. The
includeExcludefield defines if the fields specified byfields, which are a NutrientViewer.Immutable.List of form field names, should reset all form fields excluding the defined fields or just the defined fields. WhenincludeExcludeis set totrue, all form fields except the fields defined infieldswill be reset. IfincludeExcludeis set to false, which is the default value for this field, only the form fields defined infieldswill be reset.