ToolJet/docs/versioned_docs/version-2.33.0/widgets/overview.md
Akshay 2d08d889de
Release: Community changes (v2.34.0) (#9226)
* add custom resolvers info and editable row selection info (#9057)

* fix system requirements icon

* add auth info for webhooks and fix casing

* add regex custom validation info (#9068)

* [docs]: Marketplace 1.7 updates (#9085)

* [docs] Amazon redshift plugin

* make minor improvements

* add and update docs for marketplace 1.7

* update order of plugins in overview to match sidebar

* create new version

---------

Co-authored-by: Shubhendra <withshubh@gmail.com>

* add the latest version in the versions.json file (#9094)

* [docs]: Update PDF component (#9088)

* update PDF component

* merged with develop and added changes to the new version

* update docs favicon: (#9118)

* [docs] SSO revamp (#9031)

* add method to set default language

* update image settings through custom css and update screenshots for getting started and tooljet concepts (#9158)

* fix read documentation button

* fix formatting for setup icons (#9172)

* fix sidebar link for aws lambda

* Update static media (#9175)

* updated the screenshots

* reduced the gif size

* reverted the package.json file

* edited the zoomed in images and replaced some gifs with screenshots

* removed one gif

* update static media

* update file names

* update toolbar

* fix file names

* fix: dynamodb img path

* update media for org management dashboard

* fix: casing and formatting

* update workspace constant media

* update media in workspace settings and github

* update github sso

* minor change to github sso docs

* minor fix

* update google sso

* change includeCurrentVersion flag to false

---------

Co-authored-by: Asjad Ahmed Khan <iitasjad2001@gmail.com>
Co-authored-by: Asjad Ahmed Khan <60435499+2001asjad@users.noreply.github.com>
Co-authored-by: Karan Rathod <karan.altcampus@gmail.com>

* Feature: Engagespot plugin (#9012)

* feat(plugins): added engagespot plugin

* feat(docs): added engagespot plugin docs

* chore(engagespot-plugin): revised copywritings

* Feature: Databricks data source (#9174)

* plugin-created

* Databricks integration

* icon, error handling

* removed unrelated changes from marketplace and frontend package-lock.json removed runAsync and maxRows timeouts pending

* timeout implementation

* socket timeout and error handling

* resolve comments

* resolve comments2

* solved render issue test connection improvements

* solved undefined error

* fix TJDB not null value fail for is operation (#9055)

* fix TJDB not null value fail for is operation

* handling not null and null case insenstive values

* Support for marketplace plugin deploy on render preview app (#9221)

* Fix for marketplace error on render preview app

* add marketplace build command

* Adding new workflow for building marketplace plugin

* removed render app creation

* [:docs] Add documentation for Databricks plugin (#9224)

* add docs for databricks

* update databricks docs

* update docs

* remove ref to clusters

* bump to v2.34.0

* Fixed data source cypress failure (#9227)

* updated spec with required text

* updated mongodb and import spec

* updated import spec

---------

Co-authored-by: Karan Rathod <karan.altcampus@gmail.com>
Co-authored-by: Adish M <44204658+adishM98@users.noreply.github.com>
Co-authored-by: Midhun G S <gsmithun4@gmail.com>
Co-authored-by: Shubhendra <withshubh@gmail.com>
Co-authored-by: Aman Regu <amanregu@gmail.com>
Co-authored-by: Asjad Ahmed Khan <iitasjad2001@gmail.com>
Co-authored-by: Asjad Ahmed Khan <60435499+2001asjad@users.noreply.github.com>
Co-authored-by: Jobin Jose <129726530+jobin-logidots@users.noreply.github.com>
Co-authored-by: Syed Mohammad Akhtar Rizvi <85864291+ShazanRizvi@users.noreply.github.com>
Co-authored-by: blank0537 <111295371+blank0537@users.noreply.github.com>
Co-authored-by: Mekhla Asopa <59684099+Mekhla-Asopa@users.noreply.github.com>
2024-03-29 19:13:26 +05:30

5.4 KiB

id title
overview Overview

Components: Overview

Components are used to build the UI of the applications. They can be dragged onto the canvas from the Component Library and can be modified from the Properties Panel without needing to write any code. Event Handlers in Components allow end users to trigger queries and other application events to perform the Actions.

Adding components

Components can be dragged and dropped from the Component Library(from the right side on app builder) on to the canvas. Components can be moved by simply click and hold, and can be resized from edges or borders.

Components: Overview

Select multiple components

For moving the multiple components at once, simply shift+click, to select multiple components. Once grouped, the components can be moved on the canvas while maintaining their relative positions.

Components: Overview

You can also create a selection triangle and move multiple components together by click and drag

Components: Overview

:::tip You can also use many other Keyboard Shortcuts in ToolJet to copy, cut, paste components to the canvas. :::

Component properties

Each Component can be modified and styled from the Properties Panel such as the data field, a toggle for disabling the component, or stylings like a background color. Properties can be modified directly or programmatically by using Bindings, which enables you to write JavaScript code.

Components: Overview

Component Event Handlers

Event Handlers can be found in the Component's Property Panel or in the Advanced section of the Query. Event handlers can be used to trigger Actions such as executing the queries, perform Component Specific Actions(CSA) or for setting a variable.

Event handlers for components have the following properties:

  1. Event: Each component has its own set of exclusive events. You can refer to the component reference to find the specific events available for each component. These events are triggered by user interactions or other actions within the application.

  2. Action: Actions are the operations that can be performed when an event is triggered. There is a comprehensive list of available actions, which can be found in the actions reference documentation. In addition to general actions, each component may also have its own set of Component Specific Actions (CSA) that are specific to that particular component. The CSA can be found in the respective component reference.

  3. Run Only If: The "Run Only If" property allows you to define a condition that must be satisfied before the event handler's action is executed. By specifying a condition, you can control the flow of execution and ensure that the action is only performed when the condition is met.

Event Handler

Using Run only if

With this option in Event Handlers, users can specify a condition that must be met before the event handler's action is executed. This allows for more fine-grained control over when certain actions should be triggered in response to component events.

For example, let's consider a button component with an OnClick event handler. By specifying a "Run Only If" condition for the event handler, users can control when the associated action should be executed. Here's an example:

Button Component
  └─ OnClick Event Handler: runQuery()
                      
                      ├─ Run Only If: expression/condition

In this case, the action runQuery() will only be triggered if the expression/condition is truthy. The expression/condition can utilize the values dynamically from other parts of the application or exposed variables.

Example expressions:

{{globals.currentUser.groups[1] === 'admin'}} // returns true if the current user is admin

or

{{components.form1.isValid}} // isValid holds the boolean value true or false
Components: Run only if

Bindings

Bindings allow you to get dynamic data into the components. Anything inside of {{}} is evaluated as a JavaScript expression in ToolJet.

Any arbitrary JavaScript code can be written inside {{}}:

{{(function () {
        <your_javascript_code_here>
    })()
}}

or

{{components.xyz.data.key === Sun ?? true : false}}

:::tip Check out the How-to guides like changing color of text in table column, Enable/Disable a component using JavaScript, and more. :::