remove Action

An action to remove components from the UI.

{
  "remove": {
    "ids": [
      "someID",
      "anotherID"
    ]
  }
}

Properties

ids
STRING | ARRAY

The component IDs to remove.

Note

On successful remove of components, the entire UI will be marked for re-layout.

Examples

Remove a label

{
  "type": "view",
  "layout": "inline",
  "direction": "vertical",
  "components": [
    {
      "id": "exampleLabel",
      "type": "label",
      "text": "I am a text label to serve as the target"
    },
    {
      "type": "button",
      "text": "Remove the label",
      "events": [
        {
          "triggers": "actioned",
          "action": {
            "type": "json",
            "src": {
              "remove": {
                "relayout": true,
                "ids": "exampleLabel"
              }
            }
          }
        }
      ]
    }
  ]
}