In MainUI pages, I am trying to set attributes in some widgets based on variable actions performed on other widgets but it seems the expression using the variables is not refreshed.
For example in this simple test, I can’t get the second label to update upon action on the first:
config:
label: Tests vars
sidebar: true
blocks:
- component: oh-block
config: {}
slots:
default:
- component: oh-grid-row
config: {}
slots:
default:
- component: oh-grid-col
config: {}
slots:
default:
- component: oh-label-card
config:
action: variable
actionVariable: testvar
actionVariableValue: MyValue
label: Set testvar to MyValue
- component: oh-grid-row
config: {}
slots:
default:
- component: oh-grid-col
config: {}
slots:
default:
- component: oh-label-card
config:
label: '="Variable = "+ ((vars.testvar) ? vars.testvar : "N/A")'
masonry: null
grid: []
canvas: []
When looking at the Keypad example, it looks like this is exacly what is done. Is it a limitation where a variable can only be used within the same (custom) widgets but not across several widgets in a page?