resetWidget()
The resetWidget()
framework function sets a widget to its default state. All user input changes are reverted and its properties' default values are applied.
Signature
resetWidget(widgetName: string, resetChildren?: boolean = true) -> Promise
Parameters
widgetName
A string which is the name of the widget to reset.
resetChildren
An optional boolean value which determines whether all child widgets should also be reset. This is true
by default.
Example 1:
Reset a Container widget and all other widgets that it contains:
{{ resetWidget("Container1") }}
Example 2:
Reset the state of a List widget without affecting the contents of Input widgets contained within the list items:
{{ resetWidget("List1", false) }}