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

Jenny_Lai
January 19, 2022

Would be very useful to be able to set/change property states based on a trigger (ex: load screen).

Laura_Franca
January 25, 2022

Hi guys, what I did - and worked (not perfectly, but it did got the effect I wanted) is to put the option “mouse leave” on the open component linking to the closed one.

Another suggestion to Figma devs would be to be able to make two results with the same action. Ex: on click > nav to x page AND change component to Y

Laura_Franca
January 25, 2022

Hi guys, what I did - and worked (not perfectly, but it did got the effect I wanted) is to put the option “mouse leave” on the open component linking to the closed one.

Another suggestion to Figma devs would be to be able to make two results with the same action. Ex: on click > nav to x page AND change component to Y

Tsvetan_Kolev
January 25, 2022

Ok. I just don’t get it. This is something very important. It’s a major bug that ruins the whole point of interactive components and @anon21722796 haven’t paid any attention to all people complaining for almost a year.
Meanwhile we are all losing valuable time to seek for work-arounds instead of working on our projects.

Steven7
January 27, 2022

I personally think this is a massive road block to using interactive components “interactively”. If you can’t have a select that switches between a default/active/interactive state in an overlay modal that when the modal closes the states reset to default then what’s the point.

For me this shows just how behind Figma is on the prototyping front compared to the complexity that ProtoPie and ProtoIO deliver.

taylor1
January 27, 2022

Same here @anon21722796 this is super painful. This almost defeats the purpose of interactive components.

Aleksandr5
January 29, 2022

Ehh…

Just a small +1

Berlinguette_David
New Participant
February 1, 2022

Plus 1. This seems like a huge miss with a fairly simple solution.

Cagdas_Kara
New Participant
February 11, 2022

Hello everyone.

I have a question with interactive components. I don’t want to keep interactive status. I want to reset my component variant status. For example I have switch toggles. I click to on my switch and I am going to other pages, and then I am going to this screen, my switch still active. I don’t want to this. I want to reset status. Is this possible?

I have a video below 👇

Cameron_Gibson
February 16, 2022

Guessing no update on this yet? Would be great to sort this