Skip to main content
Syeds
Inspiring
September 25, 2023
Question

Copy Component Does Not Keep States

  • September 25, 2023
  • 1 reply
  • 302 views

I have searched other similar posts but was not exactly clear. I have a component state of a Date flied dropdown labeled "From". I want to duplicate it with a "To" label. Instead of working as it should it loses all its states/behaviors. I really do not want to do all of it again. I tried the reccommended alternatives form other posts but I cannot get it to work.

 

FYI: My company is blocking Dropbox so I cannot post the XD file.

This topic has been closed for replies.

1 reply

Spas K.
Community Expert
Community Expert
September 27, 2023

Hey there. Didn't understand, are you duplicating the whole component, creating an instance, or are you copying a state within a component? Can you upload some screenshots of what you're trying to achieve?

 

P.S. If you're trying to make another main component out of this one, you have to create a new file, copy it there, and then copy it from that file back to the original file.

Syeds
SyedsAuthor
Inspiring
September 28, 2023

I will try to post screenshots but I do not think they will help much. In the meantme, I did put in a request for the IT at my company to give me access to Dropbox.

 

I am trying to copy an entire component and not just specific states. The states copy but they are not wired so I have to go and manually repeat all the steps again which I do not want to do if I can avoid it. I want to duplicate the "From" component and just change the label to "To".