# \[BUG\] Perspective copy paste component doesn't always copy all associated properties

**URL:** <https://forum.inductiveautomation.com/t/bug-perspective-copy-paste-component-doesnt-always-copy-all-associated-properties/37838>\
**Category:** Ignition\
**Tags:** perspective, ignition80\
**Created:** [August 18, 2020, 7:07am UTC](https://forum.inductiveautomation.com/t/bug-perspective-copy-paste-component-doesnt-always-copy-all-associated-properties/37838 "2020-08-18T07:07:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [August 18, 2020, 7:07am UTC](https://forum.inductiveautomation.com/t/bug-perspective-copy-paste-component-doesnt-always-copy-all-associated-properties/37838/1 "2020-08-18T07:07:56Z")

</div>

v8.0.15

When I copy and paste the below json into a flex container, the “shrink: 0” doesn’t make it and it becomes a “1”. The basis doesn’t get set right either, should be “auto” but it pastes as “50px”. The json is from a copy of another existing component, screenshot below.

```auto
[
  {
    "type": "ia.display.label",
    "version": 0,
    "props": {
      "text": "Status"
    },
    "meta": {
      "name": "Label"
    },
    "position": {
      "shrink": 0
    },
    "custom": {}
  }
]

```

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/a/0a43f693eceb4038156c6faa3f9e09ef544ec4f6.png)

Edit:  
In addition, components aren’t pasted in the right order. See below, components should be in the order of “Status label” “Status value” “Current Step Label” “Current Step Value”, but instead it’s reversed.  
Update: It seems that items are copied in the order in which they’re selected. I guess that makes sense.

```auto
[
  {
    "type": "ia.display.label",
    "version": 0,
    "props": {
      "style": {
        "backgroundColor": "#555555",
        "borderBottomLeftRadius": "5px",
        "borderBottomRightRadius": "5px",
        "borderColor": "#2B2B2B40",
        "borderStyle": "solid",
        "borderTopLeftRadius": "5px",
        "borderTopRightRadius": "5px",
        "borderWidth": 1,
        "color": "#E7EFF6",
        "paddingLeft": "5px",
        "paddingRight": "5px",
        "textAlign": "center"
      }
    },
    "meta": {
      "name": "Label_4"
    },
    "position": {
      "shrink": 0,
      "basis": "30px"
    },
    "custom": {},
    "propConfig": {
      "custom.Cancelled": {
        "binding": {
          "config": {
            "fallbackDelay": 2.5,
            "mode": "indirect",
            "references": {
              "1": "{view.custom.sequenceTagPath}"
            },
            "tagPath": "{1}/Sequence Cancelled"
          },
          "type": "tag"
        }
      },
      "custom.Complete": {
        "binding": {
          "config": {
            "fallbackDelay": 2.5,
            "mode": "indirect",
            "references": {
              "1": "{view.custom.sequenceTagPath}"
            },
            "tagPath": "{1}/Sequence Complete"
          },
          "type": "tag"
        }
      },
      "custom.Paused": {
        "binding": {
          "config": {
            "fallbackDelay": 2.5,
            "mode": "indirect",
            "references": {
              "1": "{view.custom.sequenceTagPath}"
            },
            "tagPath": "{1}/Sequence Paused"
          },
          "type": "tag"
        }
      },
      "custom.Running": {
        "binding": {
          "config": {
            "fallbackDelay": 2.5,
            "mode": "indirect",
            "references": {
              "1": "{view.custom.sequenceTagPath}"
            },
            "tagPath": "{1}/Sequence Active"
          },
          "type": "tag"
        }
      },
      "custom.StatusDesc": {
        "binding": {
          "config": {
            "expression": "if({this.custom.Running}, \"Running\"\r\n,if({this.custom.Complete}, \"Complete\"\r\n,if({this.custom.Paused}, \"Paused\"\r\n,if({this.custom.Cancelled}, \"Cancelled\"\r\n,'Idle'\r\n))))"
          },
          "type": "expr"
        }
      },
      "props.text": {
        "binding": {
          "config": {
            "fallbackDelay": 2.5,
            "mode": "indirect",
            "references": {
              "1": "{view.custom.sequenceTagPath}"
            },
            "tagPath": "{1}/Sequence Step Description"
          },
          "transforms": [
            {
              "expression": "tag({view.custom.sequenceTagPath} + '/Sequence Step No') + ' - ' + {value}",
              "type": "expression"
            }
          ],
          "type": "tag"
        }
      }
    }
  },
  {
    "type": "ia.display.label",
    "version": 0,
    "props": {
      "text": "Current Step",
      "style": {
        "color": "#4B86B4",
        "fontSize": "10pt",
        "fontStyle": "italic",
        "fontWeight": "100"
      }
    },
    "meta": {
      "name": "Label_0"
    },
    "position": {
      "shrink": 0,
      "basis": "30px"
    },
    "custom": {}
  },
  {
    "type": "ia.display.label",
    "version": 0,
    "props": {
      "style": {
        "borderBottomLeftRadius": "5px",
        "borderBottomRightRadius": "5px",
        "borderTopLeftRadius": "5px",
        "borderTopRightRadius": "5px",
        "marginBottom": "10px",
        "paddingLeft": "5px",
        "paddingRight": "5px",
        "textAlign": "center"
      }
    },
    "meta": {
      "name": "Label_3"
    },
    "position": {
      "shrink": 0,
      "basis": "30px"
    },
    "custom": {},
    "propConfig": {
      "custom.Cancelled": {
        "binding": {
          "config": {
            "fallbackDelay": 2.5,
            "mode": "indirect",
            "references": {
              "1": "{view.custom.sequenceTagPath}"
            },
            "tagPath": "{1}/Sequence Cancelled"
          },
          "type": "tag"
        }
      },
      "custom.Complete": {
        "binding": {
          "config": {
            "fallbackDelay": 2.5,
            "mode": "indirect",
            "references": {
              "1": "{view.custom.sequenceTagPath}"
            },
            "tagPath": "{1}/Sequence Complete"
          },
          "type": "tag"
        }
      },
      "custom.Paused": {
        "binding": {
          "config": {
            "fallbackDelay": 2.5,
            "mode": "indirect",
            "references": {
              "1": "{view.custom.sequenceTagPath}"
            },
            "tagPath": "{1}/Sequence Paused"
          },
          "type": "tag"
        }
      },
      "custom.Running": {
        "binding": {
          "config": {
            "fallbackDelay": 2.5,
            "mode": "indirect",
            "references": {
              "1": "{view.custom.sequenceTagPath}"
            },
            "tagPath": "{1}/Sequence Active"
          },
          "type": "tag"
        }
      },
      "custom.StatusDesc": {
        "binding": {
          "config": {
            "expression": "if({this.custom.Running}, \"Running\"\r\n,if({this.custom.Complete}, \"Complete\"\r\n,if({this.custom.Paused}, \"Paused\"\r\n,if({this.custom.Cancelled}, \"Cancelled\"\r\n,'Idle'\r\n))))"
          },
          "type": "expr"
        }
      },
      "props.style.classes": {
        "binding": {
          "config": {
            "path": "this.custom.StatusDesc"
          },
          "transforms": [
            {
              "fallback": null,
              "inputType": "scalar",
              "mappings": [
                {
                  "input": "Running",
                  "output": "DeviceStates/On"
                },
                {
                  "input": "Complete",
                  "output": "DeviceStates/On"
                },
                {
                  "input": "Paused",
                  "output": "DeviceStates/Paused"
                },
                {
                  "input": "Cancelled",
                  "output": "DeviceStates/Off"
                },
                {
                  "input": "Idle",
                  "output": "DeviceStates/Off"
                }
              ],
              "outputType": "scalar",
              "type": "map"
            }
          ],
          "type": "property"
        }
      },
      "props.text": {
        "binding": {
          "config": {
            "path": "this.custom.StatusDesc"
          },
          "type": "property"
        }
      }
    }
  },
  {
    "type": "ia.display.label",
    "version": 0,
    "props": {
      "text": "Status",
      "style": {
        "color": "#4B86B4",
        "fontSize": "10pt",
        "fontStyle": "italic",
        "fontWeight": "100"
      }
    },
    "meta": {
      "name": "Label"
    },
    "position": {
      "shrink": 0,
      "basis": "30px"
    },
    "custom": {}
  }
]

```

---

<div class="post-metadata">

**Author:** ![michael2](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@michael2](https://forum.inductiveautomation.com/u/michael2)\
**Post date:** [August 19, 2020, 12:59am UTC](https://forum.inductiveautomation.com/t/bug-perspective-copy-paste-component-doesnt-always-copy-all-associated-properties/37838/2 "2020-08-19T00:59:48Z")

</div>

Yeah this is something I’d like to see fixed as well.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [August 20, 2020, 7:48am UTC](https://forum.inductiveautomation.com/t/bug-perspective-copy-paste-component-doesnt-always-copy-all-associated-properties/37838/3 "2020-08-20T07:48:30Z")

</div>

This one is actually quite annoying!! I find myself cutting components and pasting them into containers quite frequently, or just copying and pasting in general, and every time they lose their `shrink` and `basis` properties ☹

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 20, 2020, 8:18pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-copy-paste-component-doesnt-always-copy-all-associated-properties/37838/4 "2020-08-20T20:18:42Z")

</div>

I filed a ticket for this. Seems like it should be an easy fix, I say as someone who hasn’t had to deal with Perspective internals in a while 🙂

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 12, 2020, 12:04am UTC](https://forum.inductiveautomation.com/t/bug-perspective-copy-paste-component-doesnt-always-copy-all-associated-properties/37838/5 "2020-10-12T00:04:30Z")

</div>

Definitely hanging out for this fix! When doing a lot of copy/pastes into flex’s this gets a bit tedious having to change the basis and shrink values to what they were copied from 😵
