Widgets

list

9min

Whenever a list

 is configured either in the jig.list, or list-item component, the list is automatically populated on the surface of the widget without needing additional configuration. There is also the option to extend the list widget by using the Extend List Widget property, which reuses the list

configuration and its data to extend or override some of the properties in the widget. The item data is called from [email protected].

There are, instances when you want to create a list widget on a

 that is not a list

, such as a jig.default. This is primarily where the list widget is used.

List widgets
List widgets

List widgets
List widgets


Configuration options

A list widget can be used on any type of

, i.e. list, default, composite, calendar and document.

Core options



item

The item property includes the setup options of:

Other options



bottom

The titles component will be added to the bottom of the widget.

data

Provide the datasource for the list. For example: data: [email protected]

footer

Add text to the footer of the widget.

footerAlign

Align the footer text to left, right, center.

placeholders

Specify a placeholder text to display if there is no data, for example - title: No data to display.

top

The titles component will be added to the top of the widget.

State Configuration

Key

Notes

amount checked

  • Applies to a list, list.item, product-item, and stage components. List's data is an array of records. The [email protected] is the state of the current object in the array.

amount checked

  • State is the variable of the component.

activeItemId now

  • Global state variable that can be used throughout the solution.

Configuration options for extended list widget

The Extended List Widget can only be used on a list

 . The purpose of using this widget is to customize what shows in the widget on the

rather than showing its automatic list display. The Extended List Widget must be configured with a size 2x2 or greater. Reuse the data in the list

, for example, [email protected] or [email protected].

Core options



item

The item property includes the setup options of:

Examples and code snippets 

Automatic widget display because of list jig type (Simple)

2x2 list
2x2 list


When using a jig.list and any size widget larger than 1x1 the list will automatically be displayed without additional configurations. This is visible in this example.

In this example, the list on the widget is the same as the jig.list once the widget has been accessed.

Examples: See the complete example using static data in GitHub. See the complete example using dynamic data in GitHub.

Datasources: See the complete datasource for static data in GitHub. See the complete datasource for dynamic data in GitHub.

list-widget (Static)
list-widget (dynamic)


Automatic widget display because of list jig type (UI elements)

2x2 list with avatar
2x2 list with avatar


When using a jig.list and any size widget larger than 1x1 the list will automatically be displayed without additional configurations.

In this example, the list on the widget is exactly the same as the jig.list once the widget has been accessed.

Examples: See the complete example using static data in GitHub. See the complete example using dynamic data in GitHub.

Datasources: See the complete datasource for static data in GitHub. See the complete datasource for dynamic data in GitHub.

list-with-left-element (static)
list-with-left-element (dynamic)


List widget with stage component items

2 stage list widget
2 stage list widget


This example is for list items that have a left and right element and shows a start-and-end. An example of this is flight schedules, however, this can be used for many different use cases as you can choose a different icon. Here a slightly different setup is used to that in the actual list to show you the widget configuration.

Examples: See the complete example using static data in GitHub. See the complete example using dynamic data in GitHub.

Datasources: See the complete datasource for static data in GitHub. See the complete datasource for dynamic data in GitHub.

stage-list-widget (static)
stage-list-widget (dynamic)


List widget with product items

2x2 product-item list widget
2x2 product-item list widget


This example shows product items with their images and respective prices.

Examples: See the complete example using static data in GitHub. See the complete example using dynamic data in GitHub.

Datasources: See the complete datasource for static data in GitHub. See the complete datasource for dynamic data in GitHub.

list-product-widget (static)
list-product-widget (dynamic)


List widget with list items

2x2 list-item basic widget
2x2 list-item basic widget


This example shows a basic component.list-item setup.

Examples: See the complete example using static data in GitHub. See the complete example using dynamic data in GitHub.

Datasources: See the complete datasource for static data in GitHub. See the complete datasource for dynamic data in GitHub.

list-items-widget (static)
list-items-widget (dynamic)


Extended list widget 2x4, 4x2, 4x4

Extended list widget
Extended list widget


This example shows how the Extend List Widget reuses the data from a single jig.list to customize the widget's appearance on the

. In the image above:

  1. The first widget is the default 2x2 widget that is automatically displayed.
  2. The second widget is a 2x4 using the Extend List widget to only show the titles in the list.
  3. The third widget is a 4x2 using the Extend List Widget with a component.stage configuration.
  4. The fouth widget is a 4x4 using the Extend List Widget to show a customized leftElement and RightElement.
extended-list-widget (2x4)
extended-list-widget (4x2)
extended-list-widget (4x4)
datasource (static)


Group list widgets

See the following examples under groups:

See also



Updated 08 Aug 2024
Doc contributor
Did this page help you?