I would like to use my parameter ‘displayMode’ in the following line of my widget to choose if it uses .displayState or .state. How can I do that?
footer: =items[loop.item.name].state
Here is the full code of my widget:
uid: Popup_List_ItemsInGroup
tags: []
props:
parameters:
- description: Small title on top of the card
label: Title
name: title
required: true
type: TEXT
- context: item
description: item to control
label: Item
name: item
required: true
type: TEXT
- description: Icon which should be shown
label: Icon
name: icon
required: false
type: TEXT
timestamp: Apr 11, 2023, 10:31:46 PM
component: f7-card
config:
title: =props.title
slots:
default:
- component: oh-list
config: {}
slots:
default:
- component: oh-repeater
config:
for: item
fragment: true
groupItem: =props.item
sourceType: itemsInGroup
slots:
default:
- component: oh-list-item
config:
footer: =items[loop.item.name].state
icon: =props.icon
iconUseState: true
item: =loop.item.name
title: =loop.item.label
Can someone help me with the correct syntax to do this?