Datasource

static

5min

Static lists are typically used when data needs to be accessed but hardly ever manipulated, handled, or updated. Within , we have ensured that static data is easily specified but also accessed with the same ease. Static data can be configured as a direct data source on a jig or as a global datasource that can be accessed or referenced across various jigs or components. This data source, whether configured locally or globally can be

Configuration options

When setting up a static datasource component within a Jig you have the option to use them in various ways:

  1. As a locally configured data source within a jig for locally stored data to be available
  2. As a global data source that allows easy access and reusability to the data across various jigs and components

You also have the option to set up static data directly in the relevant fields. This scenario is however not discussed here as this section focuses only on the application of the static data component itself. Please refer to the guide on working with Static Data for more information on the alternative application.

Examples and code snippets 

View common uses for the static datasource below and how you can configure the same in your solution (links to examples are available in the relevant examples).

We've gone ahead and expanded the first one for you. Feel free to view any others you'd like to inspect.

Document image


Below is an example of static data that has been configured locally.

Examples: See the full example using static data on GitHub.

static-data-local-jig

Document image


Below is an example of static data that has been configured globally along with the example of where this is being referenced.

Examples: See the full example of static datasource in GitHub. See the full example of the list using this global static datasource in GitHub.



global-static-datasource.-jig
referenced-data-jig


You can also create static data right inside your component or as an initialValue, without a need to specify the datasource.

Dropdown with static data
Dropdown with static data




In this example static data is used to create the data need for selection in the component.dropdown.

See the full code sample on Github.

dropdown.jigx

List
List


In this example static data is defined and used in the component.list-item.

See the code sample in GitHub.

list.jigx


See also



Updated 24 Jul 2024
Doc contributor
Doc contributor
Did this page help you?