ToolJet/docs/versioned_docs/version-2.12.0/contributing-guide/tutorials/create-widget.md
Shubhendra Singh Chauhan 0be7df2b71
[docs] Marketplace 1.2 (#6969)
* [docs]harperdb nosql

* [docs]new operations in dynamodb

* [docs] minor changes in dynamodb

* [docs]redis revamp with encode-decode

* [docs]azure blob gds

* [docs]graphql authentication type udpate

* [docs]added v2.12.0

* minor fix in how to use inspector

* minor fix in pdf&filepicker
2023-08-09 12:17:43 +05:30

1,010 B

id title
creating-widget Creating Widgets

Creating Widgets

These are some of the most useful properties and functions passed to the widget

properties

The properties object will contain the configurable properties of a widget, initially obtained from its definition on widgetConfig.js. The values inside properties change whenever the developer makes changes to the inspector panel of ToolJet editor.

exposedVariables

The exposedVariables object will contain the values of all exposed variables as configured in widgetConfig.js.

setExposedVariable('exposedVariableName', newValue)

This function allows you to update the value of an exposed variable to newValue.

validate(value)

This function validates the value passed based on the validation settings configured on the inspector panel for the widget. It returns an array [isValid, validationError], which represents respectively, whether the value passed is valid, and the error message if there is one.