ToolJet/docs/versioned_docs/version-2.68.0/contributing-guide/tutorials/create-widget.md
Aman Regu bdfe3270e2
[docs]: v2.68.0-Beta (#10755)
* docs: jira

* docs: formatting + Client Credentials grant type

* docs: connection string pgsql

* docs: parameterized queries mysql

* docs: parameterized queries in PostgreSQL

* docs: update mysql example

* docs: TJDB sql editor

* docs: add metadata to REST API

* docs: add, update  postgresql media

* docs: add metadata to graphql

* docs: update parameterized queries

* docs: add parameterized queries for mssql

* docs: add SSL Cert to mysql

* docs: TJDB SQL restricted commands

* docs: update JIRA token location

* docs: update delete issue example

* docs: update find user by query example

* docs: remove session id from get assignable users

* docs: use correct image for get issues for board

* docs: update create issue example

* docs: update delete issue media

* docs: update assignable users media

* docs: update examples

* docs: update key desc

* docs: v2.68.0-Beta
2024-09-13 19:23:19 +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.