Skip to main content
Shane
February 26, 2021

LAUNCHED: State management for prototypes

  • February 26, 2021
  • 205 replies
  • 21529 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

Shane
ShaneAuthor
November 8, 2021

You’re right, there would need to be the ability to set any/all properties associated with that component - for that reason, I don’t think a checkbox would work either; there would be no easy way to go back to and tweak the initial settings. Maybe a popout copy of the properties panel (akin to the colour panel for example) where you set the initial value of each property?

Jared_r
New Participant
November 9, 2021

Any update on this?

Pablo1
November 10, 2021

I am experiencing the same problem.

I am doing checkboxes with a “check all” interaction.

When clicking “unchecking all” I expect it to go back to the default state (all boxes unchecked), but instead, all previously checked boxes are still selected. It remembers the last selections and never resets.

I have no hope since there are no updates since March :/.

Duncan1
November 16, 2021

I’m experiencing the same issue here with the check all interaction on check boxes. Would be great to have the option to navigate back to a screen in it’s original state

falsesymmetry
November 23, 2021

Hi all, I created its slider component that contains 4 variants, based on delay and loop. The bad thing is, when switching to another frame, the slider doesn’t reset and plays the latest slide before switching the frame. Any solutions?

Demo:
figma.com/proto/QXq38iyU9ryBy7575ozpRI/Demo?node-id=1%3A2&scaling=min-zoom&page-id=0%3A1&starting-point-node-id=1%3A2

How to use demo:

  1. Wait for the 2 or 3,4 slide to appear
  2. Click “Another page” tab
  3. Go back to the previous frame by clicking “Home” tab
  4. The slide component didn’t reset and shows the latest slide
MPuula
November 24, 2021

+1 to this. I got content that is displayed with a timer based intro animation, and used in multiple different places across the prototype. I thought interactive components would be a great way to simplify the prototype by just having a single component to hold all the animation logic, so I went and did so, and replaced everything with that shiny new component. Only to revert back to the original once I realized the problem described here. I really hope this gets fixed/improved, interactive components are a bit crippled in the current state.

Xuan_Tu_n
December 3, 2021

+1 i have the same problem. Look like figma wont solve this.

G111
December 6, 2021

Yes… we’re encountering this with most of the interactive variants we use. It really needs a reset on load option.

Hey Figma, would really like a solution to this.

Giovanni1
December 6, 2021

Hey Figma, this is something that needs to be addressed as soon as possibile. Please release a fix.

This also affects transitions with animations that are triggered by delays. If you navigate twice to the Frame that contains that animation, you’re only gonna see it the first time and there’s no way to make it visibile again “on load”.

This is a major problem and needs attention.

Patrick-Plaggenborg
Active Member
January 18, 2022

Same problem here. Interactive Component states are maintained throughout the prototype and won’t reset even if they disappear and reappear later.

Only workaround so far is to reset the entire Prototype. Which allows you to prototype specific sequences only once before you need to reset it again.

Would be great to have a state reset or some way to configure components to show up in their ‘Last’ state or ‘Initial’ state.