Skip to main content
Question

Preserving component state

  • January 1, 2024
  • 1 reply
  • 352 views

I have a form component (Component A) with 1 variant representing an empty form and 3 representing different fill states. I created a prototype in this component where on click the form variant changes from empty to fill, based on the form field clicked.

Now I am using this component in a screen where the user can click on the field to fill the form, and then he/she can click away from this screen, and at a later stage, this screen is repeated in the prototype flow.

Now the problem is that when this screen with the component is repeated, the contained component (Component A) is still in the state(variant) where the user left it the last time he/she interacted with it.

How do I make it so that every time the screen is presented to the user in the same prototype flow, Component A is reset to its initial state?

This topic has been closed for replies.

1 reply

Gayani_S
Figmate
  • Community Support
  • 2196 replies
  • January 2, 2024

Hey Prashant, thank you for reaching out!
Have you tried to use Reset component state: Reset to original component state, as set on the canvas.
You can find more information in our Help Center Article. https://help.figma.com/hc/en-us/articles/14397859494295-State-management-for-prototypes#01H7KCNN3MQB5YR6CJP2TGMSZN


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings