Hi Yves,
I encountered the same problem and opened a GitHub issue for it: Issue 1579
Currently, the ui_control
node doesn't provide feedback when switching between tabs.
In the meantime, I've found a workaround that you might find useful:
[
{
"id": "df43142233a26f31",
"type": "ui-template",
"z": "0f700032737e9c68",
"group": "fa5b29b40662d5ba",
"page": "",
"ui": "",
"name": "uiEvent - TabLoaded",
"order": 17,
"width": "0",
"height": "0",
"head": "",
"format": "<script>\nexport default {\n methods: {\n notify() {\n this.send(\"tabLoaded\");\n }\n },\n mounted() {\n this.notify();\n }\n}\n</script>",
"storeOutMessages": true,
"passthru": false,
"resendOnRefresh": true,
"templateScope": "local",
"className": "",
"x": 708,
"y": 104,
"wires": [
[]
],
"icon": "font-awesome/fa-arrow-circle-o-right"
},
{
"id": "fa5b29b40662d5ba",
"type": "ui-group",
"name": "tabLoaded",
"page": "3b55700ea78c34ca",
"width": "24",
"height": "1",
"order": 1,
"showTitle": false,
"className": "",
"visible": "true",
"disabled": "false",
"groupType": "default"
},
{
"id": "3b55700ea78c34ca",
"type": "ui-page",
"name": "Page Name",
"ui": "",
"path": "/page10",
"icon": "home",
"layout": "grid",
"theme": "default",
"breakpoints": [
{
"name": "Default",
"px": "0",
"cols": "3"
},
{
"name": "Tablet",
"px": "576",
"cols": "6"
},
{
"name": "Small Desktop",
"px": "768",
"cols": "9"
},
{
"name": "Desktop",
"px": "1024",
"cols": "12"
}
],
"order": 1,
"className": "",
"visible": "true",
"disabled": "false"
}
]
This script sends a payload when the tab where this template node is located loads. I hope it helps you!