script-server icon indicating copy to clipboard operation
script-server copied to clipboard

Dependant parameter is loaded twice on page opening

Open bugy opened this issue 2 years ago • 0 comments

If there is a dependent parameter, which is based on another parameter and a script, it is loaded twice, if another parameter has a default value. E.g.:

 {
      "name": "Required Text",
      "default": "apt"
    },
    {
      "name": "Command-based list",
      "default": "lib",
      "type": "list",
      "values": {
        "script": "ls /var | grep -v lock | grep -v backups"
      }
    },

    {
      "name": "Dependant list",
      "type": "list",
      "values": {
        "script": "sleep 10 && ls /var/${Command-based list}/${Required Text}",
        "shell": true
      }
    }

In this cage, the script is invoked when a page is loading and then once again, after UI is rendered already

bugy avatar Apr 21 '23 18:04 bugy