Building Apps with Jigx
Data
Static Data
6min
With Static Data, the dataset is created directly inside the jig file or as a global datasource in the datasources folder of a Jigx solution. Static Data is useful because it can be created quickly right inside the jig file, and there is no need to specify any database connections or set up any tables. The amount of records that can be created for the Static Data is unlimited. Static Data is normally used to bind data to the UI components.
- Under the datasource section specify the name of your datasource
- Type must datasource.static
- In the data object, you need to specify the key and value pair for your array of records
You can use Expressions in your static data items as well.

See the full example in GitHub
- Inside the datasources folder of your solution create a new file called <your_datasource_name>.jigx
- Inside that file set componentId to datasource.static
- In the data object you need to specify the key and value pair for your array of records

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

See the full code sample on Github.

Updated 14 Jul 2023





Did this page help you?