Skip to main content
Shane
February 26, 2021

LAUNCHED: State management for prototypes

  • February 26, 2021
  • 205 replies
  • 21530 views

Just struck a pretty simple use case/scenario where I need the component to reset it’s state when I leave the frame. This has been touched on elsewhere, but this is such a common and key use that I thought I’d put it in it’s own thread.

Scenario:
I’ve got a dropdown menu with three items in it, with each item changing what columns are visible in a table and some other control states. I have three frames, each with a view of the table setup as it should be, and want to use the dropdown items to navigate between the frames - basically faking the table state change. All of this works perfectly, however when I navigate back to a previous table view state, the dropdown component is already in it’s open state - not what I want.

Current workaround: none that I can come up with (other than not using interactive components at all for this, and just using multiple frames for the dropdown open/closed states as I would previously)

Suggestions:

  1. Have a “reset component on leaving this frame” setting for instances of a component on a frame - useful for this situation and others, but needs to be a setting so that components that should keep their state between frames can do so (light/dark toggle maybe? Something like that).
  2. Do it all in a single frame, with the dropdown component changing the the state of the table component - no frame navigation required. Would work nicely for the particular use case I’m working with here, but not sure it would solve all similar situations.
  3. Do both 1 and 2. This solution is my preferred solution 😉 😆

EDIT:
Other threads that relate:

205 replies

Melissa_Slattery
March 15, 2023

Hoping this would be resolved by now! Seems like a very fundamental behaviour to be missing!!

Lauren_Aldrich
March 15, 2023

Adding another comment here in hopes that more replies will lead to action from Figma. Pretty absurd that this hasn’t been addressed yet.

Wondering: can the OP @Emiliano_Cicero convert this topic to something we can vote on? I’m not sure if that functionality exists in these support topics. Worth a try?

Frzo
March 16, 2023

+1 for me. Resetting Component States on Click would be so useful.

Christos
New Member
March 22, 2023

+1. Why is this feature taking that long? with the state management feature it would be a good timing. Its really important for making a good navigation Proto.

March 24, 2023

Hello rockstars. I have the tiniest question.

Context: I have a prototype with lots of frames representing UI states. Figma has made it very easy to wire up the prototype (some testers think it’s the actual app. ha! ). At various stages, I show progress bar components which simply use After Delay → Change To → Use Smart Animation.

The Issue: When a user arrives at a UI state, these Progress Bar animations play perfectly, but only the first time the user arrives at that frame. During their adventure, they may arrive at that same UI state many times, however…the component animation only plays the first time. Sometimes, the “After Delay” appears to begin counting when the prototype is started–not when the frame is loaded.

The Question: Am I totally looking at this wrong? Or is there a simple way to ensure these animated elements play correctly each time the frame is loaded.

Thanks in advance for any hints. 😃

March 27, 2023

+1, Adding another comment here in hopes that more replies will lead to action from Figma. Pretty absurd that this hasn’t been addressed yet.

Abishai
March 27, 2023

Would really appreciate a fix for this… i’ve been going insane for the past few hours 🙃

Dan15
March 28, 2023

Been a good two years now, guys. Planning on addressing this sometime this century?

Marco_Camelo
March 29, 2023

+1. That would super useful Figma. 🙏

Harry_Nuril
March 31, 2023

Come on, figma. I spent some hours trying to figure out this issue and found out that this issue has been here for two years?

+1 for fix