When copying a set of Variants and a Component with the Variants inside it i get different paste results depending if it is copied from a file shared as a library or the original file.
The first copy paste, from a library file where the components have already been copy/pasted once, produces an instance instead of a component.
The second copy paste, copied from the original file and pasted into a new file creates a component.
Does anyone have any idea if this is intended behavior and the reasoning behind it? Pasting a component from each copy is the result I am looking for.
1 Like
Here is the answer from support if anyone else is wondering -
" So the component 'MySwitch’ will paste as an instance as long as you are copying it from a file where it is published. This goes for all single main components that are published. Copying and pasting is seen as another way of inserting an instance into a file in this workflow.
Variants do not behave in the same way when it comes to pasting, as you cannot have a full set of variants as an instance. This is why you’re seeing a difference when you paste the variant set, it can only be pasted as a main component, regardless of whether the file it is coming from is published or not.
The ‘MySwitch’ component in the file ‘SwitchTemplate’ is not published, this is why it pastes as a main component. If you published this file, then it would paste in the same way as it does when you copy from the ‘Library’ file. This is because you cannot have an instance of a component that is not published outside of the file it was created in."
1 Like
Hey, I had somewhere same question. I have created a dropdown result mean when users click on the filed the dropdown result comes and as the team wanted boolean properties for the same. But as soon as I made them component and if use the instances and I try to copy anything it gets copied in the background but not in the instance. so does it mean anytime I need to copy anything in my Dropdown list I need to do the changes in the main Design system file and i wont be able to do the changes (Copy of any element in the current file) ?
Hi!
Just to clarify, are you looking to update the instances whenever the main component has been modified? Are you experiencing issues with instances not reflecting changes made to the main component? If these instances are located in a separate file, you will need to publish the file containing your main components in order to apply the updates to the instances.
If you want changes to be made only on the instance side, you can use overrides to alter only the instances.
I may have misunderstood your objective, so don’t hesitate to respond if you have any additional questions!
Thanks,
Toku
1 Like