website logo
👥 Community🎯 Samples on GitHub🚦System Status
💡 Guides
🚀 Examples
🍕 Developer Reference
⚡️ Changelog
🎥 Video Library
Navigate through spaces
⌘K
Examples Overview
Setting up your solution
Jig Types
Components
Datasource
Actions
Preview
Widgets
Expressions
Aggregation
Boolean
Comparison Operators
Date & Time
Path Operators
Functional Programming
Jigx Variables
Predicate Queries
String
Docs powered by
Archbee
Jig Types

jig.composite

7min

This  is, as the name suggests, a  made up of several parts or elements. In this case, a  is made up of several s. This  allows you to display multiple s on one list where you would otherwise not be able to combine the functionality in the same way.

Jig Composite Preview
Jig Composite Preview


Configuration options

The core structure includes: jigId 2x or more (depends on how many jigs you are connecting).

Other options:

If you are setting up a composite jig where s rely on input to display or otherwise interact with very specific data, you'll need to use:

inputs - Here you set the data you would like to transfer to the composite jig. There are 2 options for how to make data available for input:

  1. Set them in output inside the jig.
  2. Set them as a global variable by using set-state action.

isTitleHidden - The boolean value which allows you to hide the title of your  in composite. Even if the 's title is set to true , because the title is a mandatory property.

when - The ability to include or exclude a  for display on a composite . If set to true the  is included, if set to false the jig will not appear on the composite . Dynamically set this property by using expressions.

composite.jigx
|
title: My leave  
type: jig.composite

children: 
    - jigId: Profile
      when: false # use expression to dynamically define this field
      isTitleHidden: true
    - jigId: leave-form
    - jigId: leave-list


Examples and code snippets 

The code below is an extract from the full jigx-samples solution. The code snippets describe the component discussed in this section. For the solution to function in the Jigx app download the full jigx-samples project from GitHub, and follow the instructions in Setting up your solution.



Composite Jig without any form of input

Composite jig
Composite jig


This example shows the simplest way in which a Composite Jig can be set up - referencing two separate s and displaying them on one without having to filter the content.

Examples:

See the compsite  code example in GitHub. See the location code and country list code examples in GitHub. See the static country datasource code example in GitHub. See the index.jigx code below to add the  to the .



composite-jig.jigx
location-with-address.jigx
country-list-sd.jigx
datasources
index.jigx
|
datasources:
  country-data-static:
    type: datasource.static
    options:
      data:
      - title: Afghanistan
        value: AF
        icon: af
        iconType: flag
      - title: Albania
        value: AL
        icon: al
        iconType: flag
      - title: Algeria
        value: DZ
        icon: dz
        iconType: flag
      - title: American Samoa
        value: AS
        icon: as
        iconType: flag
      - title: Andorra
        value: AD
        icon: ad
        iconType: flag
      - title: Angola
        value: AO
        icon: ao
        iconType: flag
      - title: Anguilla
        value: AI
        icon: ai
        iconType: flag
      - title: Antigua And Barbuda
        value: AG
        icon: ag
        iconType: flag
      - title: Argentina
        value: AR
        icon: ar
        iconType: flag
      - title: Armenia
        value: AM
        icon: am
        iconType: flag
      - title: Aruba
        value: AW
        icon: aw
        iconType: flag
      - title: Australia
        value: AU
        icon: au
        iconType: flag
      - title: Austria
        value: AT
        icon: at
        iconType: flag
      - title: Azerbaijan
        value: AZ
        icon: az
        iconType: flag
      - title: Bahamas
        value: BS
        icon: ar
        iconType: flag
      - title: Bahrain
        value: BH
        icon: bh
        iconType: flag
      - title: Bangladesh
        value: BD
        icon: bd
        iconType: flag
      - title: Barbados
        value: BB
        icon: bb
        iconType: flag
      - title: Belarus
        value: BY
        icon: by
        iconType: flag
      - title: Belgium
        value: BE
        icon: be
        iconType: flag


Composite Jig with input

This example shows how a Composite  can be used to only display certain data based on the input received.

Composite jig with input
Composite jig with input

Composite jig with input
Composite jig with input


Examples: See the full composite  input code example in GitHub. See the folder with supporting files in GitHub. See the datasource code sample in GitHub.

See the default.jigx code snippet with the database table defined below.

Using the code below requires data in the database, the jigx.sample solution has the data provided for cleaning -services. You can use the cleaning-services.csv file in GitHub and upload it via the Data configuration in .

service-details-comp.jigx
cleaning-serv-horizon-list-dd.jigx
service-details.jigx
datasources
default.jigx
index.jigx
|
databaseId: default
tables:
  cleaning-services: null  


See also

  • Related examples (Github)



Updated 19 Sep 2023
Did this page help you?
PREVIOUS
jig.default
NEXT
jig.document
Docs powered by
Archbee
TABLE OF CONTENTS
Configuration options
Examples and code snippets
Composite Jig without any form of input
Composite Jig with input
See also
Docs powered by
Archbee
Copyright © 2023 Jigx, Inc. All rights reserved. Terms of Service